n = "".join(sorted(list(input().split('.')[0].upper().replace(' ','')),key = lambda x: ord(x),reverse = True))
ans = ''
ans2 = ''
p = 0
while n != '':
count = n.count(n[0])
if count%2 == 0:
ans += n[0]*(count//2)
ans2 = n[0]*(count//2)+ans2
else:
p += 1
t = n[0]*count
if p == 2:
print("NO")
break
n = n.replace(n[0], '')
else:
print(ans+t+ans2)