#include<iostream>
#include<cctype>
using namespace std;

class Textprocessor{
    static void convert(string str){
        for(char c:str){
            if(!isalpha(c)){
                cout<<"Invalid input"<<endl;
            }
        
    }
    for(char &c :str)
    c=toupper(c);
    cout<< str<<endl;
    cout++;
    }
};
int textprocessor::count=0;
int main(){
    int n;
    cin>>n;
    cin.ignore();
    while (n--){
        string str;
        getline(cin,str);
        textprocessor::convert(str);
    }
    return 0;
}