#include<iostream>
#include<string>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include <string>
#include <algorithm>
using namespace std;
string A,B;
int main()
{
int t,l,i;
scanf("%d",&t);
while(t--)
{
std::string str;
std::getline(cin, str);
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
cout<<str;
/*for(i=0;i<s.length();i++)
{
s[i]=toupper(s[i]);
}*/
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHN0cmluZz4KI2luY2x1ZGU8Y3N0cmluZz4KI2luY2x1ZGU8Y3N0ZGlvPgojaW5jbHVkZTxjc3RkbGliPgojaW5jbHVkZSA8c3RyaW5nPiAgIAojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpzdHJpbmcgQSxCOwppbnQgbWFpbigpCnsKaW50IHQsbCxpOwpzY2FuZigiJWQiLCZ0KTsKd2hpbGUodC0tKQp7CiAgICAgICAgc3RkOjpzdHJpbmcgc3RyOwogc3RkOjpnZXRsaW5lKGNpbiwgc3RyKTsKIHN0ZDo6dHJhbnNmb3JtKHN0ci5iZWdpbigpLCBzdHIuZW5kKCksIHN0ci5iZWdpbigpLCA6OnRvbG93ZXIpOwogICAgY291dDw8c3RyOwogICAgLypmb3IoaT0wO2k8cy5sZW5ndGgoKTtpKyspCiAgICB7CiAgICAgICAgc1tpXT10b3VwcGVyKHNbaV0pOwogICAgfSovCn0KcmV0dXJuIDA7CiB9