Problem: Shil is your new boss and he likes palindromes very much.  Palindrome is a string that can be read the same way in either direction, from the left to the right and from the right to the left. (ex. madam , aabaa, racecar)  

Given a string S , beautiful Palindrome is a lexicographical minimum palindrome that can be formed by rearranging all the characters of string S. In order to please your boss, find a beautiful Palindrome that can be formed with help of string S.  

String x is lexicographically less than string y, if either x is a prefix of y (and x ≠ y), or there exists such i (1 ≤ i ≤ min(|x|, |y|)), that xi < yi, and for any j (1 ≤ j < i) xj = yj. Here |a| denotes the length of the string a. The lexicographic comparison of strings is implemented by operator < in modern programming languages​​.

Input:
Only line of input contains string S. All the letters of this string will be in lower letters('a' - 'z').

Output:
Output lexicographical minimum Palindrome that can be formed by rearranging all the letters of string S. If no such Palindrome exist for given  input, print -1.

Constraints: 
1≤|S|≤100000

SAMPLE INPUT
aabcc

SAMPLE OUTPUT
acbca

Explanation

After rearranging all the characters , all the palindromes that can be formed are cabac and acbca. Out of these two lexicographical minimum one is acbca.

Solution (in PYTHON):

Solution:
def getPal(d):
	#print d
	z = ''
	q = ''
	y = ''
	c = 0
	for i in xrange(26):
		if d[i]!=0:
			c+=1
	if c==2:
		
		for i in xrange(26):
			if d[i]!=0:
				p = d[i]
				z+=(str(chr(i+97))*p)
		return z
	for i in xrange(26):
		
		if d[i]!=0 and d[i]%2==0:
			#print d,i,d[i],'a'*(d[i]/2)
			p = d[i]/2
			z+=(str(chr(i+97))*p)
			x = (str(chr(i+97))*p)
			#print x
			q = x+q
			
		elif d[i]!=0 and d[i]%2==1:
			p = d[i]/2
			z+=(str(chr(i+97))*p)
			x = (str(chr(i+97))*p)
			#print x
			q = x+q
			
			y += (str(chr(i+97)))*1
			
	return z+y+q		
	
	#pass

s = raw_input()
d = [0]*26
for i in s:
	d[ord(i)-97]+=1

o = 0
e = 0
for i in d:
	if i%2==1:
		o+=1
	else:
		e+=1

if o==1 or o==0:
	print getPal(d)
else:
	print '-1'