Two bodies of masses m1 and m2 are initially at rest placed infinite distance apart. They are then allowed to move towards each other under mutual gravitational attraction. Their relative velocity when they are r distance apart is