// editor1
#include<iostream>
#include<string>
#include<cctype>
using namespace std;
class name
{
   private:
   static int count;
    public:
    
    static void convertToUpper(string str)
    {
        bool valid = true;
        for(int i=0;i<str.length();i++)
        {
            for(!(str[i]>='a'&& str[i]<='z') ||(str[i]>='A' && str[i]<='Z'))
            {
            valid =false;
            break;
        }
        }
    }
    if(valid)
    {
        for(int i=0;i<str.length();i++)
        {
            str[i]=toupper(str[i]);
        }
        cout<<str<<endl;
        count++
    }
    else
    {
        cout<<"Invalid input"<<endl;
    }
    
    
};
int name::count=0;
int main()
{
    int n;
    cin>>n;
    cin.ignor();
    string str;
    for(int i=0;i<n;i++)
    {
        cin>>str;
        name::convertToUpper(str);
    }
    return 0;
}
// int main()
// {
//   string m;
//   cout<<"Enter the name:";
//   cin>>m;
//   if(islower(m))
//   {
//       cout<<(stringtoupper(m)<<endl;
//   }
//   else
//   {
//       cout<<"Invalid input";
//   }