string convertToTitle(int n) {
string str;
while(n){
int m = n % 26;
if(!m){
m=26;
n=n/26-1;
}else
n /=26;
char c = 'A' + m - 1;
str = c + str;
}
return str;
}