Exact twisted supersymmetry on a lattice