We study the groups G with the curious property that there exists an element k ∈ G and a function f: G → G such that f (xk) = xf (x) holds for all x ∈ G. This property arose from the study of near-rings and input-output automata on groups. We call a group with this property a J-group. Finite J-groups must have odd order, and hence are solvable. We prove that every finite nilpotent group of odd order is a J-group if its nilpotency class c satisfies c ≤6. If G is a finite p-group, with p > 2 and p2 > 2c-1, then we prove that G is J-group. Finally, if p > 2 and G is a regular p-group or, more generally, a power-closed one (i.e., in each section and for each m ≥ 1, the subset of pm-th powers is a subgroup), then we prove that G is a J-group.