s=input() l=set(s) for a in l: f,r=s.find(a),s.rfind(a) if f==r: print(f,a)