Label the elements of R as x1,x2,…,xk. Since there are at most k distinct elements in the set {x1,x12,…}, there must exist
r1<r2<⋯ such that x1r1=x1r2=⋯.
By considering {x2r1,x2r2,…}, we see similarly that there exist a subsequence s1<s2<⋯ of {ri} such that x2s1=x2s2=⋯.
Repeating this construction a finite number of times, we arrive at a sequence
n1<n2<… such that xin1=xin2=⋯ for 1≤i≤k.