In this paper, we study the properties of a finite p-group G such that $${|\langle x, x^y \rangle:\langle x \rangle| \leq p}$$ for all $${x,y \in G}$$. Such groups relate to a problem posed by Berkovich and Janko (Groups of prime order, Walter de Gruyter, Berlin, vol. 3, ) (Problem 1762). For such a group G, we mainly get the exponent of G′ and the nilpotent class of G.