s = input() t = sorted(s) print(t.count(t[0]) * t[0] + t[0])