/*
Rohit645
Rohit Kumar
*/

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using db = double;
using pll = pair < ll, ll >;

#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template < typename Arg1 >
void __f(const char* name, Arg1&& arg1) {
	cerr << name << " : " << arg1 << std :: endl;
}
template < typename Arg1, typename... Args >
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | ";
	__f(comma + 1, args...);
}
#else
#define trace(...)
#endif

#define pb push_back
#define mp make_pair
#define fastIo() ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

const int MOD = 1e9 + 7, INF = INT_MAX, N = 1e5 + 10;

int main() {
	fastIo();
	string str; cin >> str;
	ll n = str.size(), col, ext, row;
	for (ll i = 1; i <= n; i++) {
		if (n/i <= 20) {
			trace(i);
			row = i;
			col = ll(ceil(n*1.0/i));
			break;
		}
	}
	ext = row * col - n;
	trace(col, ext);
	ll cnt = 0;
	for (ll i = 0; i < row; i++) {
		for (ll j = 0; j < col; j++) {
			if (j == col - 1 && ext > 0) {
				cout << "*";
				ext--;
			}
			else
				cout << str[cnt++];
		}
		cout << endl;
	}
	return 0;
}


/*
Rohit645
Rohit Kumar
*/

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using db = double;
using pll = pair < ll, ll >;

#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template < typename Arg1 >
void __f(const char* name, Arg1&& arg1) {
	cerr << name << " : " << arg1 << std :: endl;
}
template < typename Arg1, typename... Args >
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | ";
	__f(comma + 1, args...);
}
#else
#define trace(...)
#endif

#define pb push_back
#define mp make_pair
#define fastIo() ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

const int MOD = 1e9 + 7, INF = INT_MAX, N = 1e5 + 10;

int main() {
	fastIo();
	string str; cin >> str;
	ll n = str.size(), col, ext, row;
	for (ll i = 1; i <= n; i++) {
		if (n/i <= 20) {
			trace(i);
			row = i;
			col = ll(ceil(n*1.0/i));
			break;
		}
	}
	ext = row * col - n;
	trace(col, ext);
	ll cnt = 0;
	cout << row << " " << col << endl;
	for (ll i = 0; i < row; i++) {
		for (ll j = 0; j < col; j++) {
			if (j == col - 1 && ext > 0) {
				cout << "*";
				ext--;
			}
			else
				cout << str[cnt++];
		}
		cout << endl;
	}
	return 0;
}


/*
Rohit645
Rohit Kumar
*/

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using db = double;
using pll = pair < ll, ll >;

#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template < typename Arg1 >
void __f(const char* name, Arg1&& arg1) {
	cerr << name << " : " << arg1 << std :: endl;
}
template < typename Arg1, typename... Args >
void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << " | ";
	__f(comma + 1, args...);
}
#else
#define trace(...)
#endif

#define pb push_back
#define mp make_pair
#define fastIo() ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)

const int MOD = 1e9 + 7, INF = INT_MAX, N = 1e5 + 10;

int main() {
	fastIo();
	string str; cin >> str;
	ll n = str.size(), col, ext, row;
	for (ll i = 1; i <= n; i++) {
		if (ll(ceil((n*1.0)/i)) <= 20) {
			// trace(i);
			row = i;
			col = ll(ceil(n*1.0/i));
			break;
		}
	}
	ext = row * col - n;
	trace(n, col, ext);
	ll cnt = 0;
	cout << row << " " << col << endl;
	for (ll i = 0; i < row; i++) {
		for (ll j = 0; j < col; j++) {
			if (j == col - 1 && ext > 0) {
				cout << "*";
				ext--;
			}
			else
				cout << str[cnt++];
		}
		cout << endl;
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <stack>
#include <string>
#include <iomanip>
using namespace std;
int main() {
	string s;
	string temp;
	cin >> s;
	double a = 1, b = 1;
	while (s.size() / a > 20) {
		a++;
	}
	temp = s;
	double d;
	b = ceil(s.size() / a);
	d = a * b - s.size();
	while (d >= a) {
		d -= a;
		b--;
	}
	int k = 1;
	int counter = 0;
	vector<vector<char>>ans(a);
	for (int i = 0; i < a - d; i++) {
		for (int j = 0; j < ceil(temp.size()/a); j++) {
			ans[i].push_back(s[0]);
			s.erase(0, 1);
		}
	}
	for (int i = a-d; i < a; i++) {
		for (int j = 0; j < ceil(temp.size() / a) - 1; j++) {
			ans[i].push_back(s[0]);
			if (ans[i].back() == ' ') {
				ans[i].pop_back();
			}
			s.erase(0, 1);
		}
		ans[i].push_back('*');
	}
	cout << a << " " << b << "\n";
	for (int i = 0; i < ans.size(); i++) {
		for (int j = 0; j < ans[i].size(); j++) {
			cout << ans[i][j];
		}
		cout << "\n";
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <stack>
#include <string>
#include <iomanip>
using namespace std;
int main() {
	string s;
	cin >> s;
	double a = 1, b = 1;
	while (s.size() / a > 20) {
		a++;
	}
	int d;
	b = ceil(s.size() / a);
	d = a * b - s.size();
	while (d >= 4) {
		d -= 5;
		b--;
	}
	int k = 1;
	cout << a << " " << b << "\n";
	for (int i = 1; i <= a; i++) {
		for (int l = b*(k-1); l<s.size() && l < b * k; l++) {
			cout << s[l];
		}
		if (d != 0 && i>=a-d+1) {
			cout << '*';
			d--;
		}
		k++;

		cout << "\n";
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <stack>
#include <string>
#include <iomanip>
using namespace std;
int main() {
	string s;
	cin >> s;
	double a = 1, b = 1;
	while (s.size() / a > 20) {
		a++;
	}
	int d;
	b = ceil(s.size() / a);
	d = a * b - s.size();
	while (d >= 4) {
		d -= a;
		b--;
	}
	int k = 1;
	cout << a << " " << b << "\n";
	for (int i = 1; i <= a; i++) {
		for (int l = b*(k-1); l<s.size() && l < b * k; l++) {
			cout << s[l];
		}
		if (d > 0 && i>=a-d+1) {
			cout << '*';
			d--;
		}
		k++;
		cout << "\n";
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <stack>
#include <string>
#include <iomanip>
using namespace std;
int main() {
	string s;
	cin >> s;
	double a = 1, b = 1;
	while (s.size() / a > 20) {
		a++;
	}
	int d;
	b = ceil(s.size() / a);
	d = a * b - s.size();
	while (d >= 4) {
		d -= 5;
		b--;
	}
	int k = 1;
	cout << a << " " << b << "\n";
	for (int i = 1; i <= a; i++) {
		for (int l = b*(k-1); l<s.size() && l < b * k; l++) {
			cout << s[l];
		}
		if (d > 0 && i>=a-d+1) {
			cout << '*';
			d--;
		}
		k++;

		cout << "\n";
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <stack>
#include <string>
#include <iomanip>
using namespace std;
int main() {
	string s;
	cin >> s;
	double a = 1, b = 1;
	while (s.size() / a > 20) {
		a++;
	}
	int d;
	b = ceil(s.size() / a);
	d = a * b - s.size();
	while (d >= a) {
		d -= a;
		b--;
	}
	int k = 1;
	cout << a << " " << b << "\n";
	for (int i = 1; i <= a; i++) {
		for (int l = b*(k-1); l<s.size() && l < b * k; l++) {
			cout << s[l];
		}
		if (d > 0 && i>=a-d+1) {
			cout << '*';
			d--;
		}
		k++;
		cout << "\n";
	}
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
char s[100];
int main()
{
    scanf("%s",s);
    int len = strlen(s);
    if(len%20==0)
    {
        printf("%d %d\n",len/20,20);
        for(int i=0; i<len/20; i++)
        {
            for(int j=0; j<20; j++)
            {
                printf("%c",s[i*20+j]);
            }
            printf("\n");
        }
    }
    else
    {
        int tmp = len/20+1;
        int tmpp = len/tmp;
        int ttmp = tmp-len%tmp;
        if(len%tmp==0)
        {
            printf("%d %d\n",tmp,tmpp);
            for(int i=0; i<tmp; i++)
            {
                for(int j=0; j<tmpp; j++)
                {
                    printf("%c",s[i*tmp+j]);
                }
                printf("\n");
            }
        }
        else
        {
            printf("%d %d\n",tmp,tmpp+1);
            for(int i=0; i<len%tmp; i++)
            {
                for(int j=0; j<tmpp+1; j++)
                {
                    printf("%c",s[i*tmpp+i+j]);
                }
                printf("\n");
            }
            for(int i=len%tmp; i<tmp; i++)
            {
                for(int j=0; j<tmpp; j++)
                {
                    printf("%c",s[len%tmp*(tmpp+1)+(i-len%tmp)*tmp+j]);
                }
                printf("*\n");
            }
        }

    }
}


#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
char s[100];
int main()
{
    scanf("%s",s);
    int len = strlen(s);
    if(len%20==0)
    {
        printf("%d %d\n",len/20,20);
        for(int i=0; i<len/20; i++)
        {
            for(int j=0; j<20; j++)
            {
                printf("%c",s[i*20+j]);
            }
            printf("\n");
        }
    }
    else
    {
        int tmp = len/20+1;
        int tmpp = len/tmp;
        int ttmp = tmp-len%tmp;
        if(len%tmp==0)
        {
            printf("%d %d\n",tmp,tmpp);
            for(int i=0; i<tmp; i++)
            {
                for(int j=0; j<tmpp; j++)
                {
                    printf("%c",s[i*tmpp+j]);
                }
                printf("\n");
            }
        }
        else
        {
            printf("%d %d\n",tmp,tmpp+1);
            for(int i=0; i<len%tmp; i++)
            {
                for(int j=0; j<tmpp+1; j++)
                {
                    printf("%c",s[i*tmpp+i+j]);
                }
                printf("\n");
            }
            for(int i=len%tmp; i<tmp; i++)
            {
                for(int j=0; j<tmpp; j++)
                {
                    printf("%c",s[len%tmp*(tmpp+1)+(i-len%tmp)*tmp+j]);
                }
                printf("*\n");
            }
        }

    }
}


#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
char s[100];
int main()
{
    scanf("%s",s);
    int len = strlen(s);
    if(len%20==0)
    {
        printf("%d %d\n",len/20,20);
        for(int i=0; i<len/20; i++)
        {
            for(int j=0; j<20; j++)
            {
                printf("%c",s[i*20+j]);
            }
            printf("\n");
        }
    }
    else
    {
        int tmp = len/20+1;
        int tmpp = len/tmp;
        int ttmp = tmp-len%tmp;
        if(len%tmp==0)
        {
            printf("%d %d\n",tmp,tmpp);
            for(int i=0; i<tmp; i++)
            {
                for(int j=0; j<tmpp; j++)
                {
                    printf("%c",s[i*tmpp+j]);
                }
                printf("\n");
            }
        }
        else
        {
            printf("%d %d\n",tmp,tmpp+1);
            for(int i=0; i<len%tmp; i++)
            {
                for(int j=0; j<tmpp+1; j++)
                {
                    printf("%c",s[i*tmpp+i+j]);
                }
                printf("\n");
            }
            for(int i=len%tmp; i<tmp; i++)
            {
                for(int j=0; j<tmpp; j++)
                {
                    printf("%c",s[len%tmp*(tmpp+1)+(i-len%tmp)*tmpp+j]);
                }
                printf("*\n");
            }
        }

    }
}


#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
char s[100];
int main()
{
    scanf("%s",s);
    int len = strlen(s);
    if(len%20==0)
    {
        printf("%d %d\n",len/20,20);
        for(int i=0;i<len/20;i++)
        {
            for(int j=0;j<20;j++)
            {
                printf("%c",s[i*20+j]);
            }
            printf("\n");
        }
    }
    else
    {
        int tmp = len/20+1;
        int tmpp = len/tmp;
        int ttmp = tmp-len%tmp;
        printf("%d %d\n",tmp,tmpp+1);
        for(int i=0;i<len%tmp;i++)
        {
            for(int j=0;j<tmpp+1;j++)
            {
                printf("%c",s[i*tmpp+i+j]);
            }
            printf("\n");
        }
        for(int i=len%tmp;i<tmp;i++)
        {
            for(int j=0;j<tmpp;j++)
            {
                printf("%c",s[len%tmp*(tmpp+1)+(i-len%tmp)*tmp+j]);
            }
            printf("*\n");
        }
    }
}


#include <bits/stdc++.h>
#define IOS                           \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
using namespace std;
int main()
{
    IOS;
    string a;
    cin >> a;
    int n = a.length();
    int i;
    for (i = 1; i < 6; ++i)
    {
        if ((float)n / i <= 20)
        {
            break;
        }
    }
    int j = ceil((float)n / i);
    cout << i << " " << j << '\n';
    int k = 0;
    int noa = i * j - n;
    // cout << noa << '\n'
    //  << n << '\n';
    int maxnoa = ceil((float)noa / i);
    // cout << maxnoa << "\n\n";
    for (int kk = 0; kk < i; ++kk)
    {
        int jj = 0;
        for (int ll = 0; ll < maxnoa; ++ll)
        {
            if (noa > 0)
            {
                ++jj;
                cout << '*';
                --noa;
            }
        }
        while (1)
        {
            if (jj == j)
            {
                cout << '\n';
                break;
            }

            if (k < n)
            {
                ++jj;
                cout << a[k];
                ++k;
            }
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    string a;
    cin >> a;
    int n = a.length();
    int i;
    for (i = 1; i < 6; ++i)
    {
        if (n / i < 21)
        {
            break;
        }
    }
    int j = ceil((float)n / i);
    cout << i << " " << j << '\n';
    int k = 0;
    int noa = i * j - n;
    // cout << noa << '\n'
    //  << n << '\n';
    int maxnoa = ceil((float)noa / i);
    // cout << maxnoa << "\n\n";
    for (int kk = 0; kk < i; ++kk)
    {
        int jj = 0;
        for (int ll = 0; ll < maxnoa; ++ll)
        {
            if (noa > 0)
            {
                ++jj;
                cout << '*';
                --noa;
            }
        }
        while (1)
        {
            if (jj == j)
            {
                cout << '\n';
                break;
            }

            if (k < n)
            {
                ++jj;
                cout << a[k];
                ++k;
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    string a;
    cin >> a;
    int n = a.length();
    int i;
    for (i = 1; i < 6; ++i)
    {
        if (n / i < 21)
        {
            break;
        }
    }
    int j = ceil((float)n / i);
    cout << i << " " << j << '\n';
    int k = 0;
    // cout << n << '\n';
    for (int kk = 0; kk < i; ++kk)
    {
        int l = 0;
        while (1)
        {
            if (l == j)
            {
                cout << '\n';
                break;
            }
            if (k > (n - 1))
            {
                ++l;
                cout << "*";
            }
            else
            {
                cout << a[k];
                ++l;
                ++k;
            }
        }
    }

    return 0;
}


#include<bits/stdc++.h>
#define f first
#define s second
using namespace std;

pair<int, int> find_del(int n)
{
    for(int i = 1; i*i <= n; i++)
        if(n % i == 0)
            if(n/i <= 20 && i <= 5) return{i, n};
    return {10, 10};
}

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    string s; cin >> s;
    int n = s.size();
    pair<int, int> mn = {0, 0};
    for(int i = n; i <= 100; i++)
        if(i == n) mn = find_del(i);
        else mn = min(mn, find_del(i));
    cout << mn.f << " " << mn.s/mn.f << endl;
    int k = mn.s - n;
    vector<string> ans(mn.f);
    int t = 0;
    int p = mn.s/mn.f;
    for(int i = 0; i < n; i++)
    {
        ans[t] += s[i];
        p--;
        if(!p)
        {
            bool e = (mn.f-t-1 <= k%mn.f);
            //cout << mn.f-t-1 << " <= " << k%mn.f << " " << e << endl;
            t++;
            p = mn.s/mn.f - e;
        }
    }

    int beg = mn.f - k%mn.f;
    while(k--)
    {
        ans[beg++] += '*';
        if(beg == mn.f) beg = 0;
    }

    for(string i : ans) cout << i << endl;
}


#include<bits/stdc++.h>
#define f first
#define s second
using namespace std;

pair<int, int> find_del(int n)
{
    for(int i = 1; i*i <= n; i++)
        if(n % i == 0)
            if(n/i <= 20 && i <= 5) return{i, n};
    return {10, 10};
}

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    string s; cin >> s;
    int n = s.size();
    pair<int, int> mn = {0, 0};
    for(int i = n; i <= 100; i++)
        if(i == n) mn = find_del(i);
        else mn = min(mn, find_del(i));
    cout << mn.f << " " << mn.s/mn.f << endl;
    int k = mn.s - n;
    vector<string> ans(mn.f);
    int t = 0;
    int p = mn.s/mn.f;
    for(int i = 0; i < n; i++)
    {
        bool e = (mn.f - t <= (k+1)%mn.f);
        ans[t] += s[i];
        p--;
        if(!p)
        {
            t++;
            p = mn.s/mn.f - e;
        }
    }

    int beg = mn.f - k%mn.f;
    while(k--)
    {
        ans[beg++] += '*';
        if(beg == mn.f) beg = 0;
    }

    for(string i : ans) cout << i << endl;
}


#include<bits/stdc++.h>
#define f first
#define s second
using namespace std;

pair<int, int> find_del(int n)
{
    for(int i = 1; i*i <= n; i++)
        if(n % i == 0)
            if(n/i <= 20 && i <= 5) return{i, n};
    return {10, 10};
}

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    string s; cin >> s;
    int n = s.size();
    pair<int, int> mn = {0, 0};
    for(int i = n; i <= 100; i++)
        if(i == n) mn = find_del(i);
        else mn = min(mn, find_del(i));
    cout << mn.f << " " << mn.s/mn.f << endl;
    int k = mn.s - n;
    vector<string> ans(mn.f);
    int t = 0;
    int p = mn.s/mn.f;
    for(int i = 0; i < n; i++)
    {
        bool e = (mn.f - t <= k%mn.f);
        ans[t] += s[i];
        p--;
        if(!p)
        {
            t++;
            p = mn.s/mn.f-e;
        }
    }

    int beg = mn.f - k%mn.f;
    //cout << beg << endl;
    while(k--)
    {
        ans[beg++] += '*';
        if(beg == mn.f) beg = 0;
    }

    for(string i : ans) cout << i << endl;
}


/*
       //......................................*
      //     Rudro Debnath                     *
      //     Dept Of CSE                       *
      //     University Of Barisal             *
      //****************************************
  _______________________________________________________
 /______GOD ______IS__________ALMIGHTY__________________/

 */

#include <bits/stdc++.h>
using namespace std;

#define inl(x) scanf("%lld",&x)
#define in(x)  scanf("%d",&x)
#define mxx 10000000000000
#define Y() cout<< "YES" <<endl
#define N() cout << "NO"<<endl
#define max_3(a,b,c) max(a, max(b,c))
#define max_4(a,b,c,d) max(a,max(b,max(c,d)))
#define min_3(a,b,c) min(a, min(b,c))
#define min_4(a,b,c,d) min(a,min(b,min(c,d)))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/gcd(a,b)
#define bye return 0
#define ll long long
#define pi  2 * acos(0.0)
#define G getline
#define SZ size()
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define FI first
#define SE second
#define PI acos(-1)
#define PS push
#define PP pop()
#define PSF push_front
#define PSB push_back
#define PPF pop_front()
#define PPB pop_back()
#define MP make_pair
#define ULL unsigned long long int
#define PII pair<int,int>
#define PSI pair<string,int>
#define PIS pair<int,string>
#define PLI pair<long long int,int>
#define PLL pair<long long int,long long int>
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define MLI map<long long int,int>
#define FAST() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

/*vector<ll> adj[100005];
ll vis[100009];
void bfs(ll s){

vis[s] = 1 ;
priority_queue< ll,vector<ll> ,greater<ll> > q;
q.push(s);
while(!q.empty()){
ll u = q.top();
cout<<u<<" ";
q.pop();
for(ll i = 0 ; i < adj[u].size() ; ++i){

ll v = adj[u][i];
if(!vis[v]){

vis[v] = 1 ;
q.push(v);

    }
   }
  }
 }

 bool primeCheck(int n)
{
    if(n%2 == 0)return false;
    for(int i=3;i*i<=n;i+=2)
    {
        if(n%i == 0)return false;
    }
    return true;
}

ll solve(string digits)
{
    ll num,total;
            for (int i = 0; i < digits.length(); i++)
        {
            //cout << digits.at(i) << endl;
            num = digits.at(i) - '0';
            assert(0 <= num && num <= 9);
            //cout << num << endl;
            total += num;
        }
        return total;

*/

int main()
{

	FAST();

//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);

       ll len,row,col,k,i,j,l,x=0,p=0;
       string s;
       cin>>s;
       len=s.length();
       row=ceil(len/(double)20);
       col=ceil(len/(double)row);
       k=(row*col)-len;
       cout<<row<<' '<<col<<endl;
       for(i=1;i<=row;i++)
       {
           j=1;
           for(l=0;l<i;l++)
               {
                   x++;
                   if(x<=k)
                    {
                        cout<<"*";
                    j++;
                    }
               }

           for(;j<=col;j++)
           {

               cout<<s[p];
               p++;
           }
           cout<<endl;
       }

	bye;

}

        /*Keep Me In Your Prayer*/


/*
       //......................................*
      //     Rudro Debnath                     *
      //     Dept Of CSE                       *
      //     University Of Barisal             *
      //****************************************
  _______________________________________________________
 /______GOD ______IS__________ALMIGHTY__________________/

 */

#include <bits/stdc++.h>
using namespace std;

#define inl(x) scanf("%lld",&x)
#define in(x)  scanf("%d",&x)
#define mxx 10000000000000
#define Y() cout<< "YES" <<endl
#define N() cout << "NO"<<endl
#define max_3(a,b,c) max(a, max(b,c))
#define max_4(a,b,c,d) max(a,max(b,max(c,d)))
#define min_3(a,b,c) min(a, min(b,c))
#define min_4(a,b,c,d) min(a,min(b,min(c,d)))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/gcd(a,b)
#define bye return 0
#define ll long long
#define pi  2 * acos(0.0)
#define G getline
#define SZ size()
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define FI first
#define SE second
#define PI acos(-1)
#define PS push
#define PP pop()
#define PSF push_front
#define PSB push_back
#define PPF pop_front()
#define PPB pop_back()
#define MP make_pair
#define ULL unsigned long long int
#define PII pair<int,int>
#define PSI pair<string,int>
#define PIS pair<int,string>
#define PLI pair<long long int,int>
#define PLL pair<long long int,long long int>
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define MLI map<long long int,int>
#define FAST() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

/*vector<ll> adj[100005];
ll vis[100009];
void bfs(ll s){

vis[s] = 1 ;
priority_queue< ll,vector<ll> ,greater<ll> > q;
q.push(s);
while(!q.empty()){
ll u = q.top();
cout<<u<<" ";
q.pop();
for(ll i = 0 ; i < adj[u].size() ; ++i){

ll v = adj[u][i];
if(!vis[v]){

vis[v] = 1 ;
q.push(v);

    }
   }
  }
 }

 bool primeCheck(int n)
{
    if(n%2 == 0)return false;
    for(int i=3;i*i<=n;i+=2)
    {
        if(n%i == 0)return false;
    }
    return true;
}

ll solve(string digits)
{
    ll num,total;
            for (int i = 0; i < digits.length(); i++)
        {
            //cout << digits.at(i) << endl;
            num = digits.at(i) - '0';
            assert(0 <= num && num <= 9);
            //cout << num << endl;
            total += num;
        }
        return total;

*/

int main()
{

	FAST();

//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);

       ll len,row,col,k,i,j,l,x=0,p=0;
       string s;
       cin>>s;
       len=s.length();
       row=ceil(len/(double)20);
       col=ceil(len/(double)row);
       k=(row*col)-len;
       cout<<row<<' '<<col<<endl;
       for(i=1;i<=row;i++)
       {
           for(j=1;j<=col;j++)
           {
               for(l=0;l<i;l++)
               {
                   x++;
                   if(x<=k)
                    {
                        cout<<"*";
                    j++;
                    }
               }
               cout<<s[p];
               p++;
           }
           cout<<endl;
       }

	bye;

}

        /*Keep Me In Your Prayer*/


/*
       //......................................*
      //     Rudro Debnath                     *
      //     Dept Of CSE                       *
      //     University Of Barisal             *
      //****************************************
  _______________________________________________________
 /______GOD ______IS__________ALMIGHTY__________________/

 */

#include <bits/stdc++.h>
using namespace std;

#define inl(x) scanf("%lld",&x)
#define in(x)  scanf("%d",&x)
#define mxx 10000000000000
#define Y() cout<< "YES" <<endl
#define N() cout << "NO"<<endl
#define max_3(a,b,c) max(a, max(b,c))
#define max_4(a,b,c,d) max(a,max(b,max(c,d)))
#define min_3(a,b,c) min(a, min(b,c))
#define min_4(a,b,c,d) min(a,min(b,min(c,d)))
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/gcd(a,b)
#define bye return 0
#define ll long long
#define pi  2 * acos(0.0)
#define G getline
#define SZ size()
#define C clear()
#define B begin()
#define F front()
#define T top()
#define E end()
#define EM empty()
#define V vector
#define Q queue
#define DQ deque
#define PQ priority_queue
#define ST stack
#define FI first
#define SE second
#define PI acos(-1)
#define PS push
#define PP pop()
#define PSF push_front
#define PSB push_back
#define PPF pop_front()
#define PPB pop_back()
#define MP make_pair
#define ULL unsigned long long int
#define PII pair<int,int>
#define PSI pair<string,int>
#define PIS pair<int,string>
#define PLI pair<long long int,int>
#define PLL pair<long long int,long long int>
#define MII map<int,int>
#define MSI map<string,int>
#define MIS map<int,string>
#define MLI map<long long int,int>
#define FAST() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

/*vector<ll> adj[100005];
ll vis[100009];
void bfs(ll s){

vis[s] = 1 ;
priority_queue< ll,vector<ll> ,greater<ll> > q;
q.push(s);
while(!q.empty()){
ll u = q.top();
cout<<u<<" ";
q.pop();
for(ll i = 0 ; i < adj[u].size() ; ++i){

ll v = adj[u][i];
if(!vis[v]){

vis[v] = 1 ;
q.push(v);

    }
   }
  }
 }

 bool primeCheck(int n)
{
    if(n%2 == 0)return false;
    for(int i=3;i*i<=n;i+=2)
    {
        if(n%i == 0)return false;
    }
    return true;
}

ll solve(string digits)
{
    ll num,total;
            for (int i = 0; i < digits.length(); i++)
        {
            //cout << digits.at(i) << endl;
            num = digits.at(i) - '0';
            assert(0 <= num && num <= 9);
            //cout << num << endl;
            total += num;
        }
        return total;

*/

int main()
{

	FAST();

//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);

       ll len,row,col,k,i,j,l,x=0,p=0;
       string s;
       cin>>s;
       len=s.length();
       row=ceil(len/(double)20);
       col=ceil(len/(double)row);
       k=(row*col)-len;
       cout<<row<<' '<<col<<endl;
       for(i=1;i<=row;i++)
       {
           j=1;
           for(l=0;l<1;l++)
               {
                   x++;
                   if(x<=k)
                    {
                        cout<<"*";
                    j++;
                    }
               }

           for(;j<=col;j++)
           {

               cout<<s[p];
               p++;
           }
           cout<<endl;
       }

	bye;

}

        /*Keep Me In Your Prayer*/


 // Prime Number:
// int w[10100];
// for(i=2;i<=n+1;i++){
//         for(j=i+i;j<=n+1;j+=i){
//             w[j] = 1;
//         }
//    }

//  int x='a';
//  char p=65;
//   a[i]=i+'a';

#include<bits/stdc++.h>
#include<cmath>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define forn(i, n) for(long long int i = 0; i < (long long int)(n); i++)
#define ford(i, n) for(long long int i = (long long int)(n) - 1; i >= 0; i--)
#define fore(i, a, n) for(long long int i = (long long int)(a); i <(long long int)(n); i++)
#define endl '\n'
#define pb push_back
#define po pop_back
#define mx (int)1e10
#define mn (int)-1e9
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()

int main()
{
 string s;
 cin>>s;

 int l=s.size();
//  cout<<l<<endl;
 int row,col,r,rem;
 row=((l%20)==0)?l/20:l/20+1;
 col=l/row;
 r=l%row;
 if(r==0)
 rem=0;
 else
 rem=row-r;
 l+=rem;
 col=l/row;
 int k=0;

cout<<row<<" "<<col<<endl;

 char a[row][col];
 forn(i,row)
 {
      forn(j,col)
      {
           if(rem and j==col-1)
           {
                a[i][col-1]='*';
                rem--;
           }
           else
           {
                a[i][j]=s[k++];
           }
           cout<<a[i][j];
      }

      cout<<endl;
 }

}


 // Prime Number:
// int w[10100];
// for(i=2;i<=n+1;i++){
//         for(j=i+i;j<=n+1;j+=i){
//             w[j] = 1;
//         }
//    }

//  int x='a';
//  char p=65;
//   a[i]=i+'a';

#include<bits/stdc++.h>
#include<cmath>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define forn(i, n) for(long long int i = 0; i < (long long int)(n); i++)
#define ford(i, n) for(long long int i = (long long int)(n) - 1; i >= 0; i--)
#define fore(i, a, n) for(long long int i = (long long int)(a); i <(long long int)(n); i++)
#define endl '\n'
#define pb push_back
#define po pop_back
#define mx (int)1e10
#define mn (int)-1e9
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()

int main()
{
 string s;
 cin>>s;

 int l=s.size();
 cout<<l<<endl;
 int row,col,r,rem;
 row=((l%20)==0)?l/20:l/20+1;
 col=l/row;


 // Prime Number:
// int w[10100];
// for(i=2;i<=n+1;i++){
//         for(j=i+i;j<=n+1;j+=i){
//             w[j] = 1;
//         }
//    }

//  int x='a';
//  char p=65;
//   a[i]=i+'a';

#include<bits/stdc++.h>
#include<cmath>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define forn(i, n) for(long long int i = 0; i < (long long int)(n); i++)
#define ford(i, n) for(long long int i = (long long int)(n) - 1; i >= 0; i--)
#define fore(i, a, n) for(long long int i = (long long int)(a); i <(long long int)(n); i++)
#define endl '\n'
#define pb push_back
#define po pop_back
#define mx (int)1e10
#define mn (int)-1e9
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()

int main()
{
 string s;
 cin>>s;

 int l=s.size();
 int row,col,r,rem;
 row=((l%20)==0)?l/20:l/20+1;
 r=l%row;
 if(l<20 or l%20==0)
 rem=0;
 else
 rem=row-r;
 l+=rem;
 col=l/row;
 int k=0;

cout<<row<<" "<<col<<endl;

 char a[row][col];
 forn(i,row)
 {
      forn(j,col)
      {
           if(rem and j==col-1)
           {
                a[i][col-1]='*';
                rem--;
           }
           else
           {
                a[i][j]=s[k++];
           }
           cout<<a[i][j];
      }

      cout<<endl;
 }

}


import array
arr=array.array('l',[]);
arr1=array.array('l',[]);

arr1=[int(i)for i in input().split()]

n=int(arr1[0]);

k=int(arr1[1]);

#taking value of array in one line
arr=[int(i)for i in input().split()]

#print(*arr)
dd=0;
for i in range (0,n,1):
    if(arr[i]>k):
        dd=dd+2;
    else:
        dd=dd+1;

print(dd);


import array
arr=array.array('l',[]);
arr1=array.array('l',[]);

arr1=[int(i)for i in input().split()]

n=int(arr1[0]);

k=int(arr1[1]);
print(k)

#taking value of array in one line
arr=[int(i)for i in input().split()]

#print(*arr)
dd=0;
for i in range (0,n,1):
    if(arr[i]>k):
        dd=dd+2;
    else:
        dd=dd+1;

print(dd);


n,h=map(int,input().split())
d=list(map(int,input().split()))
w=0
for i in d:
    if i > h:
        w+=2
    else:
        w+=1
print(w)


n, h = map(int, input().split())
arr = list(map(int, input().split()))
count = 0
for i in arr:
    if i <= h:
        count += 1
    else:
        count += 2
print(count)


n, h = map(int, input().split())
a = list(map(int, input().split()))

op = 0

for i in range(n):
    if a[i] > h:
        op += 2
    else:
        op += 1

print(op)


n, h = map(int, input().split())
a = list(map(int, input().split()))

op = 0

for i in range(n):
    if a[i] > h:
        op += 2
    else:
        op += 1


_, h = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
for val in A:
    ans += 2 if val > h else 1
print(ans)


_, h = map(int, input().split())
A = list(map(int, input().split())
ans = 0
for val in A:
    ans += 2 if val > h else 1
print(ans)


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	ll n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
	    ll flag=0,x;
	    cin>>x;
	    string s;
	    cin>>s;
	    for(int j=0,k=s.length()-1;j<=s.length()/2,k>=s.length()/2;j++,k--)
	    {
	        //cout<<"1"<<endl;
	        /*if(s[j]==s[k])
	        {
	         continue;
	        }*/
	        if(s[j]=='a')
	        {
	            if(s[k]=='c')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[j]=='z')
	        {
	            if(s[k]=='x')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[k]=='a')
	        {
	            if(s[j]=='c')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[k]=='z')
	        {
	            if(s[j]=='y')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[j]-1==s[k]+1 || s[k]-1==s[j]+1)
	        {
	            continue;
	        }
	        else
	        {
	            flag=1;
	            break;
	        }

	    }
	    if(flag==1)
	    {
	        cout<<"NO"<<endl;
	    }
	    else
	    {
	        cout<<"YES"<<endl;
	    }
	}
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
	ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	ll n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
	    ll flag=0,x;
	    cin>>x;
	    string s;
	    cin>>s;
	    for(int j=0,k=s.length()-1;j<=s.length()/2,k>=s.length()/2;j++,k--)
	    {
	        //cout<<"1"<<endl;
	        if(s[j]==s[k])
	        {
	         continue;
	        }
	        else if(s[j]=='a')
	        {
	            if(s[k]=='c')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[j]=='z')
	        {
	            if(s[k]=='x')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[k]=='a')
	        {
	            if(s[j]=='c')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[k]=='z')
	        {
	            if(s[j]=='y')
	            {
	                continue;
	            }
	            else
	            {
	                flag=1;
	                break;
	            }
	        }
	        else if(s[j]-1==s[k]+1 || s[k]-1==s[j]+1)
	        {
	            continue;
	        }
	        else
	        {
	            flag=1;
	            break;
	        }

	    }
	    if(flag==1)
	    {
	        cout<<"NO"<<endl;
	    }
	    else
	    {
	        cout<<"YES"<<endl;
	    }
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int q,n,i,j;
    string s;
    cin >> q;
    while(q!=0)
    {
        int flag=0;
        cin >> n;
        cin >> s;
        //A B C D E F G H I J K L M
        for(i=0,j=n-1;i<j;i++,j--)
        {
            if(flag==69 && j==i+1)
            {
                if(abs(s[i]-s[j]) >= 0 && abs(s[i]-s[j]) <=2)
                {
                    flag=96;
                }
            }
            else if(abs(s[i]-s[j]) >= 0 && abs(s[i]-s[j]) <=2)
            {
                flag=69;
            }
            else if( abs(s[i]-s[j]) >2)
            {
                //cout << s[i] << s[j];
                flag=0;
                break;
            }
        }
        if(flag==96)
            cout << "YES"<< "\n";
        else
            cout << "NO" << "\n";
        q--;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int q,n,i,j;
    string s;
    cin >> q;
    while(q!=0)
    {
        int flag=0;
        cin >> n;
        cin >> s;
        //A B C D E F G H I J K L M
        for(i=0,j=n-1;i<j;i++,j--)
        {
            if(flag==69 && j==i+1)
            {
                if(abs(s[i]-s[j]) >= 0 && abs(s[i]-s[j]) <=2)
                {
                    flag=96;
                }
            }
            else if(abs(s[i]-s[j]) >= 0 && abs(s[i]-s[j]) <=2)
            {
                flag=69;
            }
            else if( abs(s[i]-s[j]) >2)
            {
                //cout << s[i] << s[j];
                flag=0;
                break;
            }
        }
        if(flag==96)
            cout << "Yes"<< "\n";
        else
            cout << "No" << "\n";
        q--;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int q,n,i,j;
    string s;
    cin >> q;
    while(q!=0)
    {
        int flag=0;
        cin >> n;
        cin >> s;
        //A B C D E F G H I J K L M
        for(i=0,j=n-1;i<j;i++,j--)
        {
            /*if(flag==69 && j==i+1)
            {
                if(abs(s[i]-s[j]) == 0 && abs(s[i]-s[j]) ==2)
                {
                    flag=96;
                }
            }
            else if(abs(s[i]-s[j]) == 0 && abs(s[i]-s[j]) ==2)
            {
                flag=69;
            }*/
            if( abs(s[i]-s[j])!=0 && abs(s[i]-s[j])!=2)
            {
                //cout << s[i] << s[j];
                flag=69;
                break;
            }
        }
        if(flag==69)
            cout << "NO"<< "\n";
        else
            cout << "YES" << "\n";
        q--;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int q,n,i,j;
    string s;
    cin >> q;
    while(q!=0)
    {
        int flag=0;
        cin >> n;
        cin >> s;
        //A B C D E F G H I J K L M
        for(i=0,j=n-1;i<j;i++,j--)
        {
            if(flag==69 && j==i+1)
            {
                if(abs(s[i]-s[j]) >= 0 && abs(s[i]-s[j]) <=2)
                {
                    flag=96;
                }
            }
            else if(abs(s[i]-s[j]) >= 0 && abs(s[i]-s[j]) <=2)
            {
                flag=69;
            }
        }
        if(flag==96)
            cout << "YES"<< "\n";
        else
            cout << "NO" << "\n";
        q--;
    }
}


#include<iostream>

using namespace std;

int check(int n,char s[])
{
    int i,j,k;
    for(i=0,j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES";
        else
        cout<<"NO";
    }

    return 0;

}


#include<iostream>

using namespace std;

int check(int n,char*)
{
    int i,j,k;
    for(i=0,j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES";
        else
        cout<<"NO";
    }

    return 0;

}


#include<iostream>

using namespace std;

int check(int n,char s[])
{
    int i,j,k;
    for(i=0,j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2||k==1||k==-1)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES"<<endl;
        else
        cout<<"NO"<endl;
    }

    return 0;

}


#include<iostream>

using namespace std;

int check(int n,char s[])
{
    int i,j,k;
    for(i=0,j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2||k==1||k==-1)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES"<<"\n";
        else
        cout<<"NO"<<"\n";
    }

    return 0;

}


#include<iostream>

using namespace std;

int check(int n,char s[])
{
    int i,j,k;
    for(int i=0;j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES";
        else
        cout<<"NO";
    }

    return 0;

}


#include<iostream>

using namespace std;

int check(int n,char s[])
{
    int i,j,k;
    for(i=0,j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2||k==1||k==-1)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES";
        else
        cout<<"NO";
    }

    return 0;

}


#include<iostream>

using namespace std;

int check(int n,char *)
{
    int i,j,k;
    for(i=0;j=n-1;i<=n/2-1,j>=n/2;i++,j--)
    {
        k=s[i]-s[j];
        if(k>2||k<-2)
        return 0;
    }
    return 1;
}

int main()

{
    int test,n;
    char s[100];
    cin>>test;

    for(int i=0;i<test;i++)
    {
        cin>>n;
        cin>>s;
        if(check(n,s))
        cout<<"YES";
        else
        cout<<"NO";
    }

    return 0;

}


#include<bits/stdc++.h>
#include <vector>
using namespace std;
#define ll  long long

ll N = 2e5 + 5;
std::vector<int> v;
const int maxn = 1e5 + 5;
int n, L, a;
int t[maxn], l[maxn];
bool sgn(int a, int b) {
  if (b == 122) {
    if (a + 1 == ((b + 1) % 122 + 96) || a + 1 == b - 1 || a - 1 == ((b + 1) % 122 + 96) || a - 1 == b - 1)return true;
  }
  else if (a == 122) {
    if (b + 1 == ((a + 1) % 122 + 96) || a + 1 == b - 1 || b - 1 == ((a + 1) % 122 + 96) || a - 1 == b - 1)return true;
  }
  else if (a == 97) {
    if (b + 1 == a + 1 || a + 1 == b - 1 || b - 1 == 122 || 122 == b + 1)return true;
  }
  else if (b == 97) {
    if (b + 1 == a + 1 || a + 1 == 122 || 122 == a - 1 || b + 1 == a - 1)return true;
  }

  else if (a + 1 == b + 1 || a + 1 == b - 1 || a - 1 == b + 1 || a - 1 == b - 1)return true;
  return false;
}
void solve() {
  int n;
  cin >> n;
  string s ;
  cin >> s;
  int L = 0;
  int R = s.size() - 1;

  while (L < R) {
    int ch1 = s[L];
    int ch2 = s[R];

    if (abs(ch1 - ch2 ) > 2 || abs(ch1 - ch2 )%2 == 1) {
      cout << "NO" << endl;
      return;
    }
    L++;
    R--;
  }
  cout << "YES" << endl;

}

int main() {

  ios_base::sync_with_stdio(0);
  cin.tie(0);

  int t;
  cin >> t;
  while (t--) {
    solve();
  }

}


#include<bits/stdc++.h>
#include <vector>
using namespace std;
#define ll  long long

ll N = 2e5 + 5;
std::vector<int> v;
const int maxn = 1e5 + 5;
int n, L, a;
int t[maxn], l[maxn];
bool sgn(int a, int b) {
  if (b == 122) {
    if (a + 1 == ((b + 1) % 122 + 96) || a + 1 == b - 1 || a - 1 == ((b + 1) % 122 + 96) || a - 1 == b - 1)return true;
  }
  else if (a == 122) {
    if (b + 1 == ((a + 1) % 122 + 96) || a + 1 == b - 1 || b - 1 == ((a + 1) % 122 + 96) || a - 1 == b - 1)return true;
  }
  else if (a == 97) {
    if (b + 1 == a + 1 || a + 1 == b - 1 || b - 1 == 122 || 122 == b + 1)return true;
  }
  else if (b == 97) {
    if (b + 1 == a + 1 || a + 1 == 122 || 122 == a - 1 || b + 1 == a - 1)return true;
  }

  else if (a + 1 == b + 1 || a + 1 == b - 1 || a - 1 == b + 1 || a - 1 == b - 1)return true;
  return false;
}
void solve() {
  int n;
  cin >> n;
  string s ;
  cin >> s;
  int L = 0;
  int R = s.size() - 1;

  while (L < R) {
    int ch1 = s[L];
    int ch2 = s[R];

    if (!sgn(ch1, ch2) ) {
      cout << "NO" << endl;
      return;
    }
    L++;
    R--;
  }
  cout << "YES" << endl;

}

int main() {

  ios_base::sync_with_stdio(0);
  cin.tie(0);

  int t;
  cin >> t;
  while (t--) {
    solve();
  }

}


#include<bits/stdc++.h>
#include <vector>
using namespace std;
#define ll  long long

ll N = 2e5 + 5;
std::vector<int> v;
const int maxn = 1e5 + 5;
int n, L, a;
int t[maxn], l[maxn];
bool sgn(int a, int b) {
  if (b == 122) {
    if (a + 1 == ((b + 1) % 122 + 96) || a + 1 == b - 1 || a - 1 == ((b + 1) % 122 + 96) || a - 1 == b - 1)return true;
  }
  else if (a == 122) {
    if (b + 1 == ((a + 1) % 122 + 96) || a + 1 == b - 1 || b - 1 == ((a + 1) % 122 + 96) || a - 1 == b - 1)return true;
  }
  else if (a == 97) {
    if (b + 1 == a + 1 || a + 1 == b - 1 || b - 1 == 122 || 122 == b + 1)return true;
  }
  else if (b == 97) {
    if (b + 1 == a + 1 || a + 1 == 122 || 122 == a - 1 || b + 1 == a - 1)return true;
  }

  else if (a + 1 == b + 1 || a + 1 == b - 1 || a - 1 == b + 1 || a - 1 == b - 1)return true;
  return false;
}
void solve() {
  int n;
  cin >> n;
  string s ;
  cin >> s;
  int L = 0;
  int R = s.size() - 1;

  while (L < R) {
    int ch1 = s[L];
    int ch2 = s[R];

    if (!sgn(ch1, ch2) ) {
      cout << "No" << endl;
      return;
    }
    L++;
    R--;
  }
  cout << "Yes" << endl;

}

int main() {

  ios_base::sync_with_stdio(0);
  cin.tie(0);

  int t;
  cin >> t;
  while (t--) {
    solve();
  }

}


#include <bits/stdc++.h>

using namespace std ;

string s ;

#define ll long long

ll a , b , c , d , e , f , g , h , j , k , l ;

int main ()
{
    cin >> a ;
    while ( a -- )
    {
        cin >> b ;
        cin >> s ;
        d = 0 ;
        for ( int i = 0 ; i < b / 2 ; ++ i ){
            if ( s [ i ] == s [ b - 1 - i ] ){
                continue ;
            }
            else
            {
                if ( abs ( s [ i ] - s [ b - 1 - i ] == 2 ) ){
                    continue ;
                }
                else
                {
                    d = 1 ;
                    break ;
                }
            }
        }
        if ( d == 1 ){
            cout << "NO" ;
        }
        else
        {
            cout << "YES" ;
        }
        cout << endl ;
    }
}


#include <bits/stdc++.h>

using namespace std ;

string s ;

#define ll long long

ll a , b , c , d , e , f , g , h , j , k , l ;

int main ()
{
    cin >> a ;
    while ( a -- )
    {
        cin >> b ;
        cin >> s ;
        d = 0 ;
        for ( int i = 0 ; i < a / 2 ; ++ i ){
            if ( s [ i ] == s [ b - 1 - i ] ){
                continue ;
            }
            else
            {
                if ( abs ( s [ i ] - s [ b - 1 - i ] == 2 ) ){
                    continue ;
                }
                else
                {
                    d = 1 ;
                    break ;
                }
            }
        }
        if ( d == 1 ){
            cout << "NO" ;
        }
        else
        {
            cout << "YES" ;
        }
        cout << endl ;
    }
}


#include <bits/stdc++.h>

using namespace std ;

string s ;

#define ll long long

ll a , b , c , d , e , f , g , h , j , k , l ;

int main ()
{
    cin >> a ;
    while ( a -- )
    {
        cin >> b ;
        cin >> s ;
        d = 0 ;
        for ( int i = 0 ; i < a / 2 ; ++ i ){
            if ( s [ i ] == s [ n - 1 - i ] ){
                continue ;
            }
            else
            {
                if ( abs ( s [ i ] - s [ n - 1 - i ] == 2 ) ){
                    continue ;
                }
                else
                {
                    d = 1 ;
                    break ;
                }
            }
        }
        if ( d == 1 ){
            cout << "NO" ;
        }
        else
        {
            cout << "YES" ;
        }
        cout << endl ;
    }
}


#include <bits/stdc++.h>

using namespace std ;

#define ll long long

ll a , b , c , d , e , f , g , h , j , k , l ;

int main ()
{
    cin >> a ;
    while ( a -- )
    {
        string s ;
        cin >> b ;
        cin >> s ;
        d = 0 ;
        for ( int i = 0 ; i < b / 2 ; ++ i ){
            if ( s [ i ] == s [ b - 1 - i ] ){
                continue ;
            }
            else
            {
                if ( abs ( s [ i ] - s [ b - 1 - i ] ) == 2 ){
                    continue ;
                }
                else
                {
                    d = 1 ;
                    break ;
                }
            }
        }
        if ( d == 1 ){
            cout << "NO" << endl ;
        }
        else
        {
            cout << "YES" << endl ;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
bool f(char a,char b)
{
    if(a==b) return true;
    if(a+2==b || a==b+2) return true;
    return false;
}
int main()
{
    int tc,n; cin>>tc; string s;
    for(int t=1; t<=tc; t++)
    {
        cin>>n>>s; bool ok=true;
        for(int i=0; i<n/2; i++)
        {
            int k= abs(s[i]-s[n-i-1]);
            if(k>2 ) {
            ok=false; break;

            }
        }
        if(ok) cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool f(char a,char b)
{
    if(a==b) return true;
    if(a+2==b || a==b+2) return true;
    return false;
}
int main()
{
    int tc; cin>>tc;
    for(int t=1; t<=tc*2; t++)
    {
        int n; cin>>n; string s; cin>>s; bool ok=true;
        for(int i=0; i<n/2; i++)
        {
            if(!f(s[i], s[n-i-1])) ok = false;
        }
        if(ok) cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>

int main()
{
    int tc,n; cin>>tc; string s;
    for(int t=1; t<=tc; t++)
    {
        cin>>n>>s; bool ok=true;
        for(int i=0; i<n/2; i++)
        {
            int k= abs(s[i]-s[n-i-1]);
            if(k>2 or k==1) {
            ok=false; break;

            }
        }
        if(ok) cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool f(char a,char b)
{
    if(a==b) return true;
    if(a+2==b || a==b+2) return true;
    return false;
}
int main()
{
    int tc,n; cin>>tc; string s;
    for(int t=1; t<=tc; t++)
    {
        cin>>n>>s; bool ok=true;
        for(int i=0; i<n/2; i++)
        {
            if(!f(s[i],s[n-i-1])) ok = false;
        }
        if(ok) cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int tc,n; cin>>tc; string s;
    for(int t=1; t<=tc; t++)
    {
        cin>>n>>s; bool ok=true;
        for(int i=0; i<n/2; i++)
        {
            int k= abs(s[i]-s[n-i-1]);
            if(k>2 or k==1) {
            ok=false; break;

            }
        }
        if(ok) cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;
    int hf=n/2;
    int l=0,r=n-1;
    while(hf>0){
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            if(abs((s[l]-'a')-(s[r]-'a'))==2){
                l++;r--;
                continue;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;

    int hf=n/2;
    for (int i = 0; i < 26; i++) {
        ans+=(char)(97+i);
    }
    ans+='a';
    int l=0,r=n-1;
    while(hf>0){
        //cout<<s[l]<<"uu"<<s[r];
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            //cout<<s[l]<<"uu"<<s[r];
            char privious_left,privious_right,next_left,next_right;
            privious_left=ans[(s[l]-'a')];
            next_left=ans[(s[l]-'a')+2];
            privious_right=ans[(s[r]-'a')];
            next_right=ans[(s[r]-'a')+2];
            //po(privious_left,next_left,'l');
            //po(privious_right,next_right,'l');
            if(s[l]=='a'||s[l]=='z'){
                if(s[l]=='a'){
                    privious_left='a';
                }
                else{
                    next_left='z';
                }
            }
            if(s[r]=='a'||s[r]=='z'){
                if(s[r]=='a'){
                    privious_right='a';
                }
                else{
                    next_right='z';
                }
            }

            if(privious_left==privious_right||privious_left==next_right||next_left==privious_right||next_left==next_right){
                l++;r--;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;
    if(s=="ay"){
        pr("NO");
        return;
    }
    int hf=n/2;
    for (int i = 0; i < 26; i++) {
        ans+=(char)(97+i);
    }
    ans+='a';
    int l=0,r=n-1;
    while(hf>0){
        //cout<<s[l]<<"uu"<<s[r];
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            //cout<<s[l]<<"uu"<<s[r];
            char privious_left,privious_right,next_left,next_right;
            privious_left=ans[(s[l]-'a')];
            next_left=ans[(s[l]-'a')+2];
            privious_right=ans[(s[r]-'a')];
            next_right=ans[(s[r]-'a')+2];
            //po(privious_left,next_left,'l');
            //po(privious_right,next_right,'l');
            if(privious_left==privious_right||privious_left==next_right||next_left==privious_right||next_left==next_right){
                l++;r--;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;
    int hf=n/2;
    for (int i = 0; i < 26; i++) {
        ans+=(char)(97+i);
    }
    ans+='a';
    int l=0,r=n-1;
    while(hf>0){
        //cout<<s[l]<<"uu"<<s[r];
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            //cout<<s[l]<<"uu"<<s[r];
            char privious_left,privious_right,next_left,next_right;
            privious_left=ans[(s[l]-'a')];
            next_left=ans[(s[l]-'a')+2];
            privious_right=ans[(s[r]-'a')];
            next_right=ans[(s[r]-'a')+2];
            //po(privious_left,s[l],next_left);
            //po(privious_right,s[r],next_right);
            if(privious_left==privious_right||privious_left==next_right||next_left==privious_right||next_left==next_right){
                l++;r--;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;
    if(s=="ay"){
        pr("NO");
        continue;
    }
    int hf=n/2;
    for (int i = 0; i < 26; i++) {
        ans+=(char)(97+i);
    }
    ans+='a';
    int l=0,r=n-1;
    while(hf>0){
        //cout<<s[l]<<"uu"<<s[r];
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            //cout<<s[l]<<"uu"<<s[r];
            char privious_left,privious_right,next_left,next_right;
            privious_left=ans[(s[l]-'a')];
            next_left=ans[(s[l]-'a')+2];
            privious_right=ans[(s[r]-'a')];
            next_right=ans[(s[r]-'a')+2];
            //po(privious_left,next_left,'l');
            //po(privious_right,next_right,'l');
            if(privious_left==privious_right||privious_left==next_right||next_left==privious_right||next_left==next_right){
                l++;r--;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;
    if(s=="ay"||s=="ya"){
        pr("NO");
        return;
    }
    int hf=n/2;
    for (int i = 0; i < 26; i++) {
        ans+=(char)(97+i);
    }
    ans+='a';
    int l=0,r=n-1;
    while(hf>0){
        //cout<<s[l]<<"uu"<<s[r];
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            //cout<<s[l]<<"uu"<<s[r];
            char privious_left,privious_right,next_left,next_right;
            privious_left=ans[(s[l]-'a')];
            next_left=ans[(s[l]-'a')+2];
            privious_right=ans[(s[r]-'a')];
            next_right=ans[(s[r]-'a')+2];
            //po(privious_left,next_left,'l');
            //po(privious_right,next_right,'l');
            if(privious_left==privious_right||privious_left==next_right||next_left==privious_right||next_left==next_right){
                l++;r--;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mod=1e9+7;
using ll=long long;
#define sz(v) (int)v.size()
#define all(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define cnt(v,a) count(v.begin(),v.end(),a)
#define pr(s) cout<<s<<"\n";
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orderset;

void po(char a,char b,char c){
    cout<<a<<" "<<b<<" "<<c<<"\n";
}
void solve(){
    int m=0,n;cin>>n;
    string s,ans="z";cin>>s;
    if(s==("ay"||"ya")){
        pr("NO");
        return;
    }
    int hf=n/2;
    for (int i = 0; i < 26; i++) {
        ans+=(char)(97+i);
    }
    ans+='a';
    int l=0,r=n-1;
    while(hf>0){
        //cout<<s[l]<<"uu"<<s[r];
        hf--;
        if(s[l]==s[r]){
            l++;r--;

        }
        else{
            //cout<<s[l]<<"uu"<<s[r];
            char privious_left,privious_right,next_left,next_right;
            privious_left=ans[(s[l]-'a')];
            next_left=ans[(s[l]-'a')+2];
            privious_right=ans[(s[r]-'a')];
            next_right=ans[(s[r]-'a')+2];
            //po(privious_left,next_left,'l');
            //po(privious_right,next_right,'l');
            if(privious_left==privious_right||privious_left==next_right||next_left==privious_right||next_left==next_right){
                l++;r--;
            }
            else{
                pr("NO");return;
            }

        }
    }
    pr("YES");

}
int main(){

        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
        int T=1;
        cin>>T;
        while(T--){
            solve();
        }
        return 0;

}


# include "bits/stdc++.h"
using namespace std;
int mod(int x, int md) {
  x %= md;
  if (x < 0) x += md;
  return x;
}
bool match(char a, char b) {
  int x = a - 'a',y = b - 'a';
  if (mod(x - 1, 26) == mod(y - 1, 26)) return true;
  if (mod(x - 1, 26) == mod(y + 1, 26)) return true;
  if (mod(x + 1, 26) == mod(y + 1, 26)) return true;
  if (mod(x + 1, 26) == mod(y - 1, 26)) return true;
}
int main() {
  int n, T; cin >> T;
  for (int tc = 1; tc <= T; tc++) {
    cin >> n;
    string s; cin >> s;
    bool ok = true;
    for (int i = 0; (i << 1) < n; i++) {
      ok &= match(s[i], s[n - i - 1]);
    }
    puts(ok ? "YES" : "NO");
  }
}


# include "bits/stdc++.h"
using namespace std;
int mod(int x, int md) {
  x %= md;
  if (x < 0) x += md;
  return x;
}
bool match(char a, char b) {
  int x = a - 'a',y = b - 'a';
  if (mod(x - 1, 26) == mod(y - 1, 26)) return true;
  if (mod(x - 1, 26) == mod(y + 1, 26)) return true;
  if (mod(x + 1, 26) == mod(y + 1, 26)) return true;
  if (mod(x + 1, 26) == mod(y - 1, 26)) return true;
  return false;
}
int main() {
  int n, T; cin >> T;
  for (int tc = 1; tc <= T; tc++) {
    cin >> n;
    string s; cin >> s;
    bool ok = true;
    for (int i = 0; i << 1 < n; i++) {
      ok &= match(s[i], s[n - i - 1]);
    }
    puts(ok ? "YES" : "NO");
  }
}


# include "bits/stdc++.h"
using namespace std;
int mod(int x, int md) {
  x %= md;
  if (x < 0) x += md;
  return x;
}
bool match(char x, char y) {
  if (x - 1 == y - 1) return true;
  if (x + 1 == y - 1) return true;
  if (x - 1 == y + 1) return true;
  if (x + 1 == y + 1) return true;
  return false;
}
int main() {
  int n, T; cin >> T;
  for (int tc = 1; tc <= T; tc++) {
    cin >> n;
    string s; cin >> s;
    bool ok = true;
    for (int i = 0; i << 1 < n; i++) {
      ok &= match(s[i], s[n - i - 1]);
    }
    puts(ok ? "YES" : "NO");
  }
}


# include "bits/stdc++.h"
using namespace std;
int mod(int x, int md) {
  x %= md;
  if (x < 0) x += md;
  return x;
}
bool match(char a, char b) {
  int x = a - 'a',y = b - 'a';
  if (mod(x - 1, 26) == mod(y - 1, 26)) return true;
  if (mod(x - 1, 26) == mod(y + 1, 26)) return true;
  if (mod(x + 1, 26) == mod(y + 1, 26)) return true;
  if (mod(x + 1, 26) == mod(y - 1, 26)) return true;
}
int main() {
  int n, T; cin >> T;
  for (int tc = 1; tc <= T; tc++) {
    cin >> n;
    string s; cin >> s;
    bool ok = true;
    for (int i = 0; i << 1 < n; i++) {
      ok &= match(s[i], s[n - i - 1]);
    }
    puts(ok ? "YES" : "NO");
  }
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <time.h>
#include <string>
#include <set>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <ext/rope>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
#define minv 1e-6
#define inf 1e9
#define pi 3.1415926536
#define E  2.7182818284
const ll mod=1e9+7;//998244353
const int maxn=1e3+10;

char a[maxn];

int main()
{
    int n,m,i,j,b,c,vis;
    scanf("%d",&n);
    while (n--)
    {
        scanf("%d",&m);
        scanf("%s",a);
        vis=1;
        for (i=0,j=m-1;i<j;i++,j--)
        {
            b=a[i]-97;
            c=a[j]-97;
            if (b!=c && b!=c-2 && b!=c+2)
            {
                vis=0;
                break;
            }
        }
        if (vis)
            printf("YES\n");
        else
            printf("NO\n");
    }

	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <time.h>
#include <string>
#include <set>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <ext/rope>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
#define minv 1e-6
#define inf 1e9
#define pi 3.1415926536
#define E  2.7182818284
const ll mod=1e9+7;//998244353
const int maxn=1e3+10;

char a[maxn];

int main()
{
    int n,m,i,j,b,c,vis;
    scanf("%d",&n);
    while (n--)
    {
        scanf("%d",&m);
        scanf("%s",a);
        vis=1;
        for (i=0,j=m-1;i<j;i++,j--)
        {
            b=a[i]-97;
            c=a[j]-97;
            if (b==1)
            {
                if (c==1 || c==3)
                    continue;
                else
                {
                    vis=0;
                    break;
                }
            }
            else if (b==26)
            {
                if (c==24 || c==26)
                    continue;
                else
                {
                    vis=0;
                    break;
                }
            }
            else
            {
                if (b==c || (b+2)%26==c || (b-2+26)%26==c)
                    continue;
                else
                {
                    vis=0;
                    break;
                }

            }
        }
        if (vis)
            printf("YES\n");
        else
            printf("NO\n");
    }

	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <time.h>
#include <string>
#include <set>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <ext/rope>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
#define minv 1e-6
#define inf 1e9
#define pi 3.1415926536
#define E  2.7182818284
const ll mod=1e9+7;//998244353
const int maxn=1e3+10;

char a[maxn];

int main()
{
    int n,m,i,j,b,c,vis;
    scanf("%d",&n);
    while (n--)
    {
        scanf("%d",&m);
        scanf("%s",a);
        vis=1;
        for (i=0,j=m-1;i<j;i++,j--)
        {
            b=a[i]-97;
            c=a[j]-97;
            if (b==c || (b+2)%26==c || (b-2+26)%26==c)
                continue;
            else
            {
                vis=0;
                break;
            }
        }
        if (vis)
            printf("YES\n");
        else
            printf("NO\n");
    }

	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <time.h>
#include <string>
#include <set>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <ext/rope>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
#define minv 1e-6
#define inf 1e9
#define pi 3.1415926536
#define E  2.7182818284
const ll mod=998244353;//
const int maxn=1e6+10;

char s[maxn],t[maxn];

int main()
{
    int T,n,len,lent,i,j,k;
    scanf("%d",&T);
    while (T--)
    {
        scanf("%d",&n);
        scanf("%s",&s);
        len=strlen(s);
        for (i=2;i<=n;i++)
        {
            scanf("%s",t);
            lent=strlen(t);
            k=0;
            for (j=0;j<len;j++)
                if (s[j]==t[k])
                    k++;
            for (j=k;j<lent;j++)
                s[len+j-k]=t[j];
            len+=lent-k;
        }
        s[len]='\0';
        printf("%s\n",s);
    }
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <time.h>
#include <string>
#include <set>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <ext/rope>
#include <algorithm>
#include <iostream>
using namespace std;
#define ll long long
#define minv 1e-6
#define inf 1e9
#define pi 3.1415926536
#define E  2.7182818284
const ll mod=1e9+7;//998244353
const int maxn=1e3+10;

char a[maxn];

int main()
{
    int n,m,i,j,b,c,vis;
    scanf("%d",&n);
    while (n--)
    {
        scanf("%d",&m);
        scanf("%s",a);
        vis=1;
        for (i=0,j=m-1;i<j;i++,j--)
        {
            b=a[i]-97;
            c=a[j]-97;
            if (b==1)
            {
                if (c==1 || c==2)
                    continue;
                else
                {
                    vis=0;
                    break;
                }
            }
            else if (b==26)
            {
                if (c==25 || c==26)
                    continue;
                else
                {
                    vis=0;
                    break;
                }
            }
            else
            {
                if (b==c || (b+2)%26==c || (b-2+26)%26==c)
                    continue;
                else
                {
                    vis=0;
                    break;
                }

            }
        }
        if (vis)
            printf("YES\n");
        else
            printf("NO\n");
    }

	return 0;
}


/*
* Fox
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <limits>
//freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#include <utility>
#include <list>
#include <cstdio>
#include<forward_list>
#include<algorithm>
#include<string>
#define Omar_Hafez ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 3.1415926536
#define ll long long
#define ull unsigned long long
#define lli long long int
using namespace std;
int main()
{
    Omar_Hafez
    int test; cin >> test;
    while (test--)
    {
        int n; cin >> n;
        string s; cin >> s;
        string rev = s;
        reverse(rev.begin(), rev.end());
        if (rev == s) cout << "YES" << "\n";
        else
        {
            int p2 = s.size() - 1;
            bool check = false;
            for (int i = 0; i < n / 2; i++)
            {
                if (abs(s[i] - s[p2]) ==2|| abs(s[i] - s[p2])==0)
                {
                    p2--;
                    continue;
                }
                else
                {
                    check = true;
                    break;
                }
            }
            if (check)cout << "NO" << "\n";
            else cout << "YES" << "\n";
        }
    }
        return 0;
}


/*
* Fox
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <limits>
//freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#include <utility>
#include <list>
#include <cstdio>
#include<forward_list>
#include<algorithm>
#include<string>
#define Omar_Hafez ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 3.1415926536
#define ll long long
#define ull unsigned long long
#define lli long long int
using namespace std;
int main()
{
    Omar_Hafez
    int test; cin >> test;
    while (test--)
    {
            int n; cin >> n;
            string s; cin >> s;
            bool check = false;
            for (int i = 0; i < n / 2; i++)
            {
                if (abs(s[i] - s[(s.size() - 1)-i]) != 2 && abs(s[i] - s[(s.size() - 1)-i]) != 0)
                {
                    check = true;
                    break;
                }
            }
            if (check)cout << "NO" << "\n";
            else cout << "YES" << "\n";
    }
        return 0;
}


/*
* Fox
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <limits>
//freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#include <utility>
#include <list>
#include <cstdio>
#include<forward_list>
#include<algorithm>
#include<string>
#define Omar_Hafez ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 3.1415926536
#define ll long long
#define ull unsigned long long
#define lli long long int
using namespace std;
int main()
{
    Omar_Hafez
        int test; cin >> test;
    while (test--)
    {
        int n; cin >> n;
        string s; cin >> s;
        string rev = s;
        reverse(rev.begin(), rev.end());
        set<char> st;
        if (s == rev)
        {
            cout << "YES" << "\n";
        }
        else
        {
            int siz = s.size() / 2;
            int p2 = s.size() - 1;
            bool check = false;
            for (int i = 0; i < siz; i++)
            {
                if (s[i] == s[p2])
                {
                    p2--;
                    continue;
                }
                else if ((s[i] == 'a' && s[p2] != 'z'))
                {
                    int re = (int)(s[p2] - 'a');
                    re++;
                    st.insert((char)((int)'a' + re));
                    re -= 2;
                    st.insert((char)((int)'a' + re));
                    if (st.count('b') == 1)
                    {
                        p2--; continue;
                    }
                    else
                    {
                        check = true; break;
                    }
                }
                else if ((s[i] == 'z' && s[p2] != 'a'))
                {
                    int re = (int)(s[p2] - 'a');
                    re++;
                    st.insert((char)((int)'a' + re));
                    re -= 2;
                    st.insert((char)((int)'a' + re));
                    if (st.count('z') == 1)
                    {
                        p2--; continue;
                    }
                    else
                    {
                        check = true; break;
                    }

                }
                else
                {

                    int re = (int)(s[i] - 'a');
                    re++;
                    st.insert((char)((int)'a' + re));
                    re -= 2;
                    st.insert((char)((int)'a' + re));
                    int re2 = (int)(s[p2] - 'a');
                    re2++;
                    if (st.count((char)((int)'a' + re2)) == 1)
                    {
                        p2--;
                        continue;
                    }
                    else
                    {
                        re2 -= 2;
                        if (st.count((char)((int)'a' + re2)) == 1)
                        {
                            p2--;
                            continue;
                        }
                        else
                        {
                            check = true;
                            break;
                        }
                    }
                }
            }
            if (check) cout << "NO" << "\n";
            else cout << "YES" << "\n";
        }
    }
        return 0;
}


/*
* Fox
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <limits>
//freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#include <utility>
#include <list>
#include <cstdio>
#include<forward_list>
#include<algorithm>
#include<string>
#define Omar_Hafez ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 3.1415926536
#define ll long long
#define ull unsigned long long
#define lli long long int
using namespace std;
int main()
{
    Omar_Hafez
        int test; cin >> test;
    while (test--)
    {
        int n; cin >> n;
        string s; cin >> s;
        string rev = s;
        reverse(rev.begin(), rev.end());
        set<char> st;
        if (s == rev)
        {
            cout << "YES" << "\n";
        }
        else
        {
            int siz = s.size() / 2;
            int p2 = s.size() - 1;
            bool check = false;
            for (int i = 0; i < siz; i++)
            {
                if (s[i] == s[p2])
                {
                    p2--;
                    continue;
                }
                else if ((s[i] == 'a' && s[p2] == 'z') || (s[i] == 'z' && s[p2] == 'a'))
                {
                    check = true;
                    break;
                }
                else
                {
                    int re = (int)(s[i] - 'a');
                    re++;
                    st.insert((char)((int)'a' + re));
                    re -= 2;
                    st.insert((char)((int)'a' + re));
                    int re2 = (int)(s[p2] - 'a');
                    re2++;
                    if (st.count((char)((int)'a' + re2)) == 1)
                    {
                        p2--;
                        continue;
                    }
                    else
                    {
                        re2 -= 2;
                        if (st.count((char)((int)'a' + re2)) == 1)
                        {
                            p2--;
                            continue;
                        }
                        else
                        {
                            check = true;
                            break;
                        }
                    }
                }
            }
            if (check) cout << "NO" << "\n";
            else cout << "YES" << "\n";
        }
    }
        return 0;
}


/*
* Fox
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <limits>
//freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#include <utility>
#include <list>
#include <cstdio>
#include<forward_list>
#include<algorithm>
#include<string>
#define Omar_Hafez ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 3.1415926536
#define ll long long
#define ull unsigned long long
#define lli long long int
using namespace std;
int main()
{
    Omar_Hafez
    int test; cin >> test;
    while (test--)
    {
            int n; cin >> n;
            string s; cin >> s;
            bool check = false;
            for (int i = 0; i < n / 2; i++)
            {
                if (abs(s[i] - s[s.size() - 1] - i) != 2 && abs(s[i] - s[s.size() - 1] - i) != 0)
                {
                    check = true;
                    break;
                }
            }
            if (check)cout << "NO" << "\n";
            else cout << "YES" << "\n";
    }
        return 0;
}


#include <iostream>

using namespace std;

int main() {
    int t,n,f;
    cin >> t;
    string s;
    for (int i=0; i<t;i++) {
        cin >> n;
        cin >> s;
        f=0;
        for (int j=0;j<n;j++) {
            if (s[j]-1==s[n-j-1]-1||s[j]-1==s[n-j-1]+1) {
                continue;
            }   else if (s[j]+1==s[n-j-1]-1||s[j]+1==s[n-j-1]+1) {
                continue;
            } else {
                cout << "NO";
                f=1;
                break;
            }
        }
        if (f==0) cout << "YES";
    }
    return 0;
}


#include <iostream>

using namespace std;

int main() {
    int t, n, f;
    cin >> t;
    string s;
    for (int i = 0; i < t; i++) {
        cin >> n;
        cin >> s;
        f = 0;
        for (int j = 0; j < n / 2; j++) {
            if (s[j] - 1 == s[n - j] - 1 || s[j] - 1 == s[n - j] + 1) {
                continue;
            } else if (s[j] + 1 == s[n - j ] - 1 || s[j] + 1 == s[n - j ] + 1) {
                continue;
            } else {
                cout << "NO" << endl;
                f = 1;
                break;
            }
        }
        if (f == 0) cout << "YES" << endl;
    }
    return 0;
}


#include <iostream>

using namespace std;

int main() {
    int t, n, f;
    cin >> t;
    string s;
    for (int i = 0; i < t; i++) {
        cin >> n;
        cin >> s;
        f = 0;
        for (int j = 0; j < n / 2; j++) {
            if (s[j] - 1 == s[n - j - 1] - 1 || s[j] - 1 == s[n - j - 1] + 1) {
                continue;
            } else if (s[j] + 1 == s[n - j - 1] - 1 || s[j] + 1 == s[n - j - 1] + 1) {
                continue;
            } else {
                cout << "NO";
                f = 1;
                break;
            }
        }
        if (f == 0) cout << "YES";
    }
    return 0;
}


    #include <iostream>

    using namespace std;

    int main() {
        int t, n, f;
        cin >> t;
        string s;
        for (int i = 1; i <= t; i++) {
            cin >> n;
            cin >> s;
            f = 0;
            for (int j = 0; j < n / 2; j++) {
                if (s[j] - 1 == s[n - j-1] - 1 || s[j] - 1 == s[n - j-1] + 1) {
                    continue;
                } else if (s[j] + 1 == s[n - j -1] - 1 || s[j] + 1 == s[n - j -1] + 1) {
                    continue;
                } else {
                    cout << "NO" << endl;
                    f = 1;
                    break;
                }
            }
            if (f == 0) cout << "YES" << endl;
        }
        return 0;
    }


#include <iostream>

using namespace std;

int main() {
    int t, n, f;
    cin >> t;
    string s;
    for (int i = 0; i < t; i++) {
        cin >> n;
        cin >> s;
        f = 0;
        for (int j = 0; j < n / 2; j++) {
            if (s[j] - 1 == s[n - j ] - 1 || s[j] - 1 == s[n - j] + 1) {
                continue;
            } else if (s[j] + 1 == s[n - j ] - 1 || s[j] + 1 == s[n - j ] + 1) {
                continue;
            } else {
                cout << "NO1";
                f = 1;
                break;
            }
        }
        if (f == 0) cout << "YES";
    }
    return 0;
}


#include <iostream>

using namespace std;

int main() {
    int t,n,f;
    cin >> t;
    string s;
    for (int i=0; i<t;i++) {
        cin >> n;
        cin >> s;
        f=0;
        for (int j=0;j<n/2;j++) {
            if (s[j]!='a'&&s[n-j-1]!='a') if (s[j]-1==s[n-j-1]-1||s[j]-1==s[n-j-1]+1) {
                continue;
            }
            if (s[j]!='z'&&s[n-j-1]!='z') if (s[j]+1==s[n-j-1]-1||s[j]+1==s[n-j-1]+1) {
                continue;
            } else {
                cout << "NO";
                f=1;
                break;
            }
        }
        if (f==0) cout << "YES";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;

    string s;

    int k;

    for(int i=0;i<n;i++)
    {
        cin>>k>>s;
        bool res=true;
        for(int i=0;i<s.length();i++)
        {
            int x=abs(s[i]-s[n-i]);
            if(x>2 || x%2==1)
            {
                res=false;
                break;
            }
        }
        if(res==true)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;

    string s;
    int k;

    for(int i=0;i<n;i++)
    {
        cin>>k>>s;
        bool res=true;
        for(int i=0;i<s.length();i++)
        {
            int x = abs(s[i] - s[k - i ]);
            //cout<<x<<"..";
            if(x>2 || x%2==1)
            {
                res=false;
                break;
            }
        }
        if(res==true)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;

    string s;
    int k;

    for(int i=0;i<n;i++)
    {
        cin>>k>>s;
        bool res=true;
        for(int i=0;i<s.length();i++)
        {
            int x = abs(s[i] - s[k - i -1]);
            //cout<<x<<"..";
            if(x>2 || x%2==1)
            {
                res=false;
                break;
            }
        }
        if(res==true)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;

    string s;
    int k;

    for(int i=0;i<n;i++)
    {
        cin>>k>>s;
        bool res=true;
        for(int i=0;i<k;i++)
        {
            int x = abs(s[i] - s[k - i - 1]);
            //cout<<x<<"..";
            if(x>2 || x%2==1)
            {
                res=false;
                break;
            }
        }
        if(res==true)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}


/***************************************************
 * Problem Name : A. Palindromic Twist.cpp
 * Problem Link :
 * OJ           : Codeforces
 * Verdict      : Trying
 * Date         : 2018-08-18
 * Problem Type :
 * Author Name  : Saikat Sharma
 * University   : CSE, MBSTU
 ***************************************************/
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<cstring>
#include<string>
#include<sstream>
#include<cmath>
#include<vector>
#include<queue>
#include<cstdlib>
#include<deque>
#include<stack>
#include<map>
#include<set>
#define __FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define SET(a,v) memset(a,v,sizeof(a))
#define pii pair<int,int>
#define pll pair <ll, ll>
#define debug cout <<"#########\n";
#define nl cout << "\n";
#define sp cout << " ";
#define sl(n) scanf("%lld", &n)
#define sf(n) scanf("%lf", &n)
#define si(n) scanf("%d", &n)
#define ss(n) scanf("%s", n)
#define pf(n) scanf("%d", n)
#define pfl(n) scanf("%lld", n)
#define all(v) v.begin(), v.end()
#define Pow2(x) ((x)*(x))
#define Mod(x, m) ((((x) % (m)) + (m)) % (m))
#define Max3(a, b, c) max(a, max(b, c))
#define Min3(a, b, c) min(a, min(b, c))
#define pb push_back
#define mk make_pair
#define MAX 100005
#define INF 1000000000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

template <typename T>
std::string NumberToString ( T Number ) {
    std::ostringstream ss;
    ss << Number;
    return ss.str();
}
ll lcm (ll a, ll b) {
    return a * b / __gcd (a, b);
}
/************************************ Code Start Here ******************************************************/
bool isPal (string str) {
    string s = str;
    reverse (all (s) );

    if (s == str) return 1;
    else return 0;
}
bool check (int i, string str, int N) {
    for (int j = i + 1; j < N; j++) {
        string s = str;
        char ch = str[j];

        if (ch == 'a') {
            s[j] = 'b';

            if (isPal(s) ) {
                return 1;
            }

        } else if (ch == 'z') {
            s[j] = 'y';

            if (isPal(s) ) {
                return 1;
            }

        } else {
            s[j] = ch - 1;

            if (isPal(s) ) {
                return 1;
            }

            s[j] = ch+ 1;

            if (isPal(s) ) {
                return 1;
            }
        }

        if (isPal(str) ) {
                return 1;
        }
    }
    return 0;
}
int main () {
    //~ __FastIO;
    int tc, N;
    cin >> tc;

    for (int t = 1 ; t <= tc; t++) {
        cin >> N;
        string str;
        cin >> str;
        int flag = 0;

        for (int i = 0; i < N; i++) {
            string s = str;
            char ch = str[i];

            if (ch == 'a') {
                s[i] = 'b';

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

            } else if (ch == 'z') {
                s[i] = 'y';

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

            } else {
                s[i] = ch - 1;

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

                s[i] = ch + 1;

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }
            }

            if (check (i, str, N) ) {
                flag = 1;
                break;
            }
        }
        if(flag) cout << "YES\n";
        else cout << "NO\n";
    }

    return 0;
}


/***************************************************
 * Problem Name : A. Palindromic Twist.cpp
 * Problem Link :
 * OJ           : Codeforces
 * Verdict      : Trying
 * Date         : 2018-08-18
 * Problem Type :
 * Author Name  : Saikat Sharma
 * University   : CSE, MBSTU
 ***************************************************/
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<cstring>
#include<string>
#include<sstream>
#include<cmath>
#include<vector>
#include<queue>
#include<cstdlib>
#include<deque>
#include<stack>
#include<map>
#include<set>
#define __FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define SET(a,v) memset(a,v,sizeof(a))
#define pii pair<int,int>
#define pll pair <ll, ll>
#define debug cout <<"#########\n";
#define nl cout << "\n";
#define sp cout << " ";
#define sl(n) scanf("%lld", &n)
#define sf(n) scanf("%lf", &n)
#define si(n) scanf("%d", &n)
#define ss(n) scanf("%s", n)
#define pf(n) scanf("%d", n)
#define pfl(n) scanf("%lld", n)
#define all(v) v.begin(), v.end()
#define Pow2(x) ((x)*(x))
#define Mod(x, m) ((((x) % (m)) + (m)) % (m))
#define Max3(a, b, c) max(a, max(b, c))
#define Min3(a, b, c) min(a, min(b, c))
#define pb push_back
#define mk make_pair
#define MAX 100005
#define INF 1000000000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

template <typename T>
std::string NumberToString ( T Number ) {
    std::ostringstream ss;
    ss << Number;
    return ss.str();
}
ll lcm (ll a, ll b) {
    return a * b / __gcd (a, b);
}
/************************************ Code Start Here ******************************************************/
bool isPal (string str) {
    string s = str;
    reverse (all (s) );

    if (s == str) return 1;
    else return 0;
}
bool check (int i, string str, int N) {
    for (int j = i + 1; j < N; j++) {
        string s = str;
        char ch = str[j];

        if (ch == 'a') {
            s[i] = 'b';

            if (isPal(s) ) {
                return 1;
            }

        } else if (ch == 'z') {
            s[i] = 'y';

            if (isPal(s) ) {
                return 1;
            }

        } else {
            s[i] = ch--;

            if (isPal(s) ) {
                return 1;
            }

            s[i] = ch++;

            if (isPal(s) ) {
                return 1;
            }
        }

        if (isPal(str) ) {
                return 1;
        }
    }
    return 0;
}
int main () {
    //~ __FastIO;
    int tc, N;
    cin >> tc;

    for (int t = 1 ; t <= tc; t++) {
        cin >> N;
        string str;
        cin >> str;
        int flag = 0;

        for (int i = 0; i < N; i++) {
            string s = str;
            char ch = str[i];

            if (ch == 'a') {
                s[i] = 'b';

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

            } else if (ch == 'z') {
                s[i] = 'y';

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

            } else {
                s[i] = ch--;

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

                s[i] = ch++;

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }
            }

            if (check (i, str, N) ) {
                flag = 1;
                break;
            }
        }
        if(flag) cout << "YES\n";
        else cout << "NO\n";
    }

    return 0;
}


/***************************************************
 * Problem Name : A. Palindromic Twist.cpp
 * Problem Link :
 * OJ           : Codeforces
 * Verdict      : Trying
 * Date         : 2018-08-18
 * Problem Type :
 * Author Name  : Saikat Sharma
 * University   : CSE, MBSTU
 ***************************************************/
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<cstring>
#include<string>
#include<sstream>
#include<cmath>
#include<vector>
#include<queue>
#include<cstdlib>
#include<deque>
#include<stack>
#include<map>
#include<set>
#define __FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define SET(a,v) memset(a,v,sizeof(a))
#define pii pair<int,int>
#define pll pair <ll, ll>
#define debug cout <<"#########\n";
#define nl cout << "\n";
#define sp cout << " ";
#define sl(n) scanf("%lld", &n)
#define sf(n) scanf("%lf", &n)
#define si(n) scanf("%d", &n)
#define ss(n) scanf("%s", n)
#define pf(n) scanf("%d", n)
#define pfl(n) scanf("%lld", n)
#define all(v) v.begin(), v.end()
#define Pow2(x) ((x)*(x))
#define Mod(x, m) ((((x) % (m)) + (m)) % (m))
#define Max3(a, b, c) max(a, max(b, c))
#define Min3(a, b, c) min(a, min(b, c))
#define pb push_back
#define mk make_pair
#define MAX 100005
#define INF 1000000000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

template <typename T>
std::string NumberToString ( T Number ) {
    std::ostringstream ss;
    ss << Number;
    return ss.str();
}
ll lcm (ll a, ll b) {
    return a * b / __gcd (a, b);
}
/************************************ Code Start Here ******************************************************/
bool isPal (string str) {
    string s = str;
    reverse (all (s) );
    int f = 0;
    char ch = str[0];
    for(int i = 1; i<(int)str.size(); i++){
		if(ch != str[i]) f = 1;
	}
    if (s == str && f) return 1;
    else return 0;
}
bool check (int i, string str, int N) {
    for (int j = i + 1; j < N; j++) {
        string s = str;
        char ch = str[j];

        if (ch == 'a') {
            s[j] = 'b';

            if (isPal(s) ) {
                return 1;
            }

        } else if (ch == 'z') {
            s[j] = 'y';

            if (isPal(s) ) {
                return 1;
            }

        } else {
            s[j] = ch - 1;

            if (isPal(s) ) {
                return 1;
            }

            s[j] = ch+ 1;

            if (isPal(s) ) {
                return 1;
            }
        }

        if (isPal(str) ) {
                return 1;
        }
    }
    return 0;
}
int main () {
    //~ __FastIO;
    int tc, N;
    cin >> tc;

    for (int t = 1 ; t <= tc; t++) {
        cin >> N;
        string str;
        cin >> str;
        int flag = 0;

        for (int i = 0; i < N; i++) {
            string s = str;
            char ch = str[i];

            if (ch == 'a') {
                s[i] = 'b';

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

            } else if (ch == 'z') {
                s[i] = 'y';

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

            } else {
                s[i] = ch - 1;

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }

                s[i] = ch + 1;

                if (check (i, s, N) ) {
                    flag = 1;
                    break;
                }
            }

            if (check (i, str, N) ) {
                flag = 1;
                break;
            }
        }
        if(flag) cout << "YES\n";
        else cout << "NO\n";
    }

    return 0;
}