//in the name of God
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const int MAXN=1000+100;
int n,ma;
int a[MAXN],s[MAXN];
ll d[MAXN],mi[MAXN];

int main(){
    cin>>n;
    char x;
    for(int i=1;i<=n;i++){
        cin>>x;
        s[i]=x-96;
    }
    for(int i=1;i<=26;i++){
        cin>>a[i];
    }
    d[0]=1;
    d[1]=1,mi[1]=1;
    for(int i=2;i<=n;i++){
        int k=a[s[i]];
        mi[i]=100000;
        d[i]=d[i-1];
        for(int j=i-1;j>=1;j--){
            k=min(k,a[s[j]]);
            if(k<i-j+1){
                ma=max(ma,i-j);
                break;
            }
            d[i]+=d[j-1];
            mi[i]=min(mi[j-1]+1,mi[i]);
        }
    }
    cout<<d[n]<<"\n"<<ma<<"\n"<<mi[n];
    return 0;
}


//in the name of God
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll MOD=1000*1000*1000+7;
const int MAXN=1000+100;
int n,ma;
int a[MAXN],s[MAXN];
ll d[MAXN],mi[MAXN];

int main(){
    cin>>n;
    char x;
    for(int i=1;i<=n;i++){
        cin>>x;
        s[i]=x-96;
    }
    for(int i=1;i<=26;i++){
        cin>>a[i];
    }
    d[0]=1;
    d[1]=1,mi[1]=1;
    for(int i=2;i<=n;i++){
        int k=a[s[i]];
        mi[i]=100000;
        d[i]=d[i-1];
        for(int j=i-1;j>=1;j--){
            k=min(k,a[s[j]]);
            if(k<i-j+1){
                ma=max(ma,i-j);
                break;
            }
            d[i]+=d[j-1];
            d[i]%=MOD;
            mi[i]=min(mi[j-1]+1,mi[i]);
        }
    }
    cout<<d[n]<<"\n"<<ma<<"\n"<<mi[n];
    return 0;
}


//in the name of God
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll MOD=1000*1000*1000+7;
const int MAXN=1000+100;
int n,ma;
int a[MAXN],s[MAXN];
ll d[MAXN],mi[MAXN];

int main(){
    cin>>n;
    char x;
    for(int i=1;i<=n;i++){
        cin>>x;
        s[i]=x-96;
    }
    for(int i=1;i<=26;i++){
        cin>>a[i];
    }
    d[0]=1;
    d[1]=1,mi[1]=1;
    ma=1;
    for(int i=2;i<=n;i++){
        int k=a[s[i]];
        mi[i]=mi[i-1]+1;
        d[i]=d[i-1];
        for(int j=i-1;j>=1;j--){
            k=min(k,a[s[j]]);
            if(k<i-j+1){
                ma=max(ma,i-j);
                break;
            }
            d[i]+=d[j-1];
            d[i]%=MOD;
            mi[i]=min(mi[j-1]+1,mi[i]);
            if(j==1) ma=max(ma,i);
        }
    }
    cout<<d[n]<<"\n"<<ma<<"\n"<<mi[n];
    return 0;
}


//in the name of God
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll MOD=1000*1000*1000+7;
const int MAXN=1000+100;
int n,ma;
int a[MAXN],s[MAXN];
ll d[MAXN],mi[MAXN];

int main(){
    cin>>n;
    char x;
    for(int i=1;i<=n;i++){
        cin>>x;
        s[i]=x-96;
    }
    for(int i=1;i<=26;i++){
        cin>>a[i];
    }
    d[0]=1;
    d[1]=1,mi[1]=1;
    ma=1;
    for(int i=2;i<=n;i++){
        int k=a[s[i]];
        mi[i]=100000;
        d[i]=d[i-1];
        for(int j=i-1;j>=1;j--){
            k=min(k,a[s[j]]);
            if(k<i-j+1){
                ma=max(ma,i-j);
                break;
            }
            d[i]+=d[j-1];
            d[i]%=MOD;
            mi[i]=min(mi[j-1]+1,mi[i]);
        }
    }
    cout<<d[n]<<"\n"<<ma<<"\n"<<mi[n];
    return 0;
}


//in the name of God
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll MOD=1000*1000*1000+7;
const int MAXN=1000+100;
int n,ma;
int a[MAXN],s[MAXN];
ll d[MAXN],mi[MAXN];

int main(){
    cin>>n;
    char x;
    for(int i=1;i<=n;i++){
        cin>>x;
        s[i]=x-96;
    }
    for(int i=1;i<=26;i++){
        cin>>a[i];
    }
    d[0]=1;
    d[1]=1,mi[1]=1;
    ma=1;
    for(int i=2;i<=n;i++){
        int k=a[s[i]];
        mi[i]=mi[i-1]+1;
        d[i]=d[i-1];
        for(int j=i-1;j>=1;j--){
            k=min(k,a[s[j]]);
            if(k<i-j+1){
                ma=max(ma,i-j);
                break;
            }
            d[i]+=d[j-1];
            d[i]%=MOD;
            mi[i]=min(mi[j-1]+1,mi[i]);
        }
    }
    cout<<d[n]<<"\n"<<ma<<"\n"<<mi[n];
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <queue>
#include <set>
using namespace std;

typedef long long ll;
int arr[27];
string str;
int n;
int maxmax = 0;
ll mod = 1e9+7;
int dp[1009][1009][27];
int countm = 10000000;
ll solve1(int ind, int last, int mni, int num){
	if(last <= n) maxmax = max(maxmax, last);
	if(ind == n){
		countm  = min(countm, num);
		return 1;
	}
	if(dp[ind][last][mni] != -1)
		return dp[ind][last][mni];
	int res = 0;
	int comp = min(arr[str[ind]-'a'], arr[mni]);
	if(comp > last){
		int temp = (arr[mni] < arr[str[ind]-'a'])?mni:(str[ind]-'a');
		res += solve1(ind+1, last+1, temp, num);
	}
	res += solve1(ind+1, 1, str[ind]-'a', num+1);
	return dp[ind][last][mni] = res%mod;
}
int main() {
	//freopen("c.in", "r", stdin);
	//freopen("output.txt", "w", stdout);
	cin >> n;
	cin >> str;
	for (int i = 0; i < 26; ++i) {
		cin >> arr[i];
	}
	memset(dp, -1, sizeof(dp));
	arr[26] = 0;
	ll res1 = solve1(0, 1000000, 26, 0)%mod;
	/*int count = 1;
	int lastm = arr[0];
	int len = 1;
	for(int i = 1; i < n; i++){
		int temp = min(lastm, arr[str[i]-'a']);
		if(temp > len){
			lastm = temp;
			len++;
		}else{
			len = 1;
			count++;
			lastm = arr[str[i]-'a'];
		}
	}*/

	cout << res1 << endl;
	cout << maxmax << endl;
	cout << countm << endl;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <queue>
#include <set>
using namespace std;

typedef long long ll;
int arr[27];
string str;
int n;
int maxmax = 0;
ll mod = 1e9+7;
int dp[1009][1009][27];
int countm = 10000000;
ll solve1(int ind, int last, int mni, int num){
	if(last < n) maxmax = max(maxmax, last);
	if(ind == n){
		countm  = min(countm, num);
		return 1;
	}
	if(dp[ind][last][mni] != -1)
		return dp[ind][last][mni];
	int res = 0;
	int comp = min(arr[str[ind]-'a'], arr[mni]);
	if(comp > last){
		int temp = (arr[mni] < arr[str[ind]-'a'])?mni:(str[ind]-'a');
		res += solve1(ind+1, last+1, temp, num);
	}
	res += solve1(ind+1, 1, str[ind]-'a', num+1);
	return dp[ind][last][mni] = res%mod;
}
int main() {
	//freopen("c.in", "r", stdin);
	//freopen("output.txt", "w", stdout);
	cin >> n;
	cin >> str;
	for (int i = 0; i < 26; ++i) {
		cin >> arr[i];
	}
	memset(dp, -1, sizeof(dp));
	arr[26] = 0;
	ll res1 = solve1(0, 1000000, 26, 0)%mod;
	/*int count = 1;
	int lastm = arr[0];
	int len = 1;
	for(int i = 1; i < n; i++){
		int temp = min(lastm, arr[str[i]-'a']);
		if(temp > len){
			lastm = temp;
			len++;
		}else{
			len = 1;
			count++;
			lastm = arr[str[i]-'a'];
		}
	}*/

	cout << res1 << endl;
	cout << maxmax << endl;
	cout << countm << endl;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <queue>
#include <set>
using namespace std;

typedef long long ll;
int arr[27];
string str;
int n;
int maxmax = 0;
ll mod = 1e9+7;
int dp[1009][1009][27];
ll solve1(int ind, int last, int mni){
	if(last < n) maxmax = max(maxmax, last);
	if(ind == n)
		return 1;
	if(dp[ind][last][mni] != -1)
		return dp[ind][last][mni];
	int res = 0;
	int comp = min(arr[str[ind]-'a'], arr[mni]);
	if(comp > last){
		int temp = (arr[mni] < arr[str[ind]-'a'])?mni:(str[ind]-'a');
		res += solve1(ind+1, last+1, temp);
	}
	res += solve1(ind+1, 1, str[ind]-'a');
	return dp[ind][last][mni] = res%mod;
}
int main() {
	//freopen("c.in", "r", stdin);
	//freopen("output.txt", "w", stdout);
	cin >> n;
	cin >> str;
	for (int i = 0; i < 26; ++i) {
		cin >> arr[i];
	}
	memset(dp, -1, sizeof(dp));
	arr[26] = 0;
	ll res1 = solve1(0, 1000000, 26);
	int count = 1;
	int lastm = arr[0];
	int len = 1;
	for(int i = 1; i < n; i++){
		int temp = min(lastm, arr[str[i]-'a']);
		if(temp > len){
			lastm = temp;
			len++;
		}else{
			len = 1;
			count++;
			lastm = arr[str[i]-'a'];
		}
	}

	cout << res1 << endl;
	cout << maxmax << endl;
	cout << count << endl;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <queue>
#include <set>
using namespace std;

typedef long long ll;
int arr[27];
string str;
int n;
int maxmax = 0;
ll mod = 1e9+7;
int dp[1009][1009][27];
ll solve1(int ind, int last, int mni){
	if(last <= n) maxmax = max(maxmax, last);
	if(ind == n)
		return 1;
	if(dp[ind][last][mni] != -1)
		return dp[ind][last][mni];
	int res = 0;
	int comp = min(arr[str[ind]-'a'], arr[mni]);
	if(comp > last){
		int temp = (arr[mni] < arr[str[ind]-'a'])?mni:(str[ind]-'a');
		res += solve1(ind+1, last+1, temp);
	}
	res += solve1(ind+1, 1, str[ind]-'a');
	return dp[ind][last][mni] = res%mod;
}
int main() {
	//freopen("c.in", "r", stdin);
	//freopen("output.txt", "w", stdout);
	cin >> n;
	cin >> str;
	for (int i = 0; i < 26; ++i) {
		cin >> arr[i];
	}
	memset(dp, -1, sizeof(dp));
	arr[26] = 0;
	ll res1 = solve1(0, 1000000, 26);
	int count = 1;
	int lastm = arr[0];
	int len = 1;
	for(int i = 1; i < n; i++){
		int temp = min(lastm, arr[str[i]-'a']);
		if(temp > len){
			lastm = temp;
			len++;
		}else{
			len = 1;
			count++;
			lastm = arr[str[i]-'a'];
		}
	}

	cout << res1 << endl;
	cout << maxmax << endl;
	cout << count << endl;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstring>
#include <queue>
#include <set>
using namespace std;

typedef long long ll;
int arr[27];
string str;
int n;
int maxmax = 0;
ll mod = 1e9+7;
ll dp[1009][1009][27];
int countm = 10000000;
ll solve1(int ind, int last, int mni, int num){
	if(last <= n) maxmax = max(maxmax, last);
	if(ind == n){
		countm  = min(countm, num);
		return 1;
	}
	if(dp[ind][last][mni] != -1)
		return dp[ind][last][mni];
	ll res = 0;
	int comp = min(arr[str[ind]-'a'], arr[mni]);
	if(comp > last){
		int temp = (arr[mni] < arr[str[ind]-'a'])?mni:(str[ind]-'a');
		res += solve1(ind+1, last+1, temp, num);
	}
	res += solve1(ind+1, 1, str[ind]-'a', num+1);
	return dp[ind][last][mni] = res%mod;
}
int main() {
	//freopen("c.in", "r", stdin);
	//freopen("output.txt", "w", stdout);
	cin >> n;
	cin >> str;
	for (int i = 0; i < 26; ++i) {
		cin >> arr[i];
	}
	memset(dp, -1, sizeof(dp));
	arr[26] = 0;
	ll res1 = solve1(0, 1000000, 26, 0)%mod;
	/*int count = 1;
	int lastm = arr[0];
	int len = 1;
	for(int i = 1; i < n; i++){
		int temp = min(lastm, arr[str[i]-'a']);
		if(temp > len){
			lastm = temp;
			len++;
		}else{
			len = 1;
			count++;
			lastm = arr[str[i]-'a'];
		}
	}*/

	cout << res1 << endl;
	cout << maxmax << endl;
	cout << countm << endl;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cassert>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <ctime>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define sz(a) (int)(a.size())
#define int long long

int dp[1111];
int longest[1111];
int babaika[1111];
int n;
string s;
int a[1111];

signed main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);
	cin >> n;
	cin >> s;
	for (int i = 0; i < n; ++i)
		cin >> a[i];
	s = '@' + s;
	dp[0] = 1;
	longest[0] = 0;
	for (int i = 0; i <= n; ++i)
		babaika[i] = 1e18;
	babaika[0] = 0;
	for (int i = 1; i <= n; ++i)
	{
		for (int len = 1; i - len >= 0; ++len)
		{
			int j = i - len + 1;
			if (a[s[j] - 'a'] >= len)
				dp[i] = (dp[i] + dp[j - 1]) % (1000000000 + 7),
				longest[i] = max(longest[j], len),
				babaika[i] = min(babaika[i], babaika[j - 1] + 1);
			else
				break;
		}
	}
	cout << dp[n] << '\n' << longest[n] << '\n' << babaika[n];
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cassert>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <ctime>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define sz(a) (int)(a.size())
#define int long long

int dp[1111];
int longest[1111];
int babaika[1111];
int n;
string s;
int a[1111];

signed main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);
	cin >> n;
	cin >> s;
	for (int i = 0; i < 26; ++i)
		cin >> a[i];
	s = '@' + s;
	dp[0] = 1;
	longest[0] = 0;
	for (int i = 0; i <= n; ++i)
		babaika[i] = 1e18;
	babaika[0] = 0;
	for (int i = 1; i <= n; ++i)
	{
		int mini = 1e9;
		for (int len = 1; i - len >= 0; ++len)
		{
			int j = i - len + 1;
			mini = min(a[s[j] - 'a'], mini);
			if (mini >= len)
				dp[i] = (dp[i] + dp[j - 1]) % (1000000000 + 7),
				longest[i] = max(longest[j - 1], len),
				babaika[i] = min(babaika[i], babaika[j - 1] + 1);
			else
				break;
		}
	}
	cout << dp[n] << '\n' << longest[n] << '\n' << babaika[n];
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cassert>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <ctime>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define sz(a) (int)(a.size())
#define int long long

int dp[1111];
int longest[1111];
int babaika[1111];
int n;
string s;
int a[1111];

signed main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);
	cin >> n;
	cin >> s;
	for (int i = 0; i < 26; ++i)
		cin >> a[i];
	s = '@' + s;
	dp[0] = 1;
	longest[0] = 0;
	for (int i = 0; i <= n; ++i)
		babaika[i] = 1e18;
	babaika[0] = 0;
	for (int i = 1; i <= n; ++i)
	{
		int mini = 1e9;
		for (int len = 1; i - len >= 0; ++len)
		{
			int j = i - len + 1;
			mini = min(a[s[j] - 'a'], mini);
			if (mini >= len)
				dp[i] = (dp[i] + dp[j - 1]) % (1000000000 + 7),
				longest[i] = max(longest[i], max(longest[j - 1], len)),
				babaika[i] = min(babaika[i], babaika[j - 1] + 1);
			else
				break;
		}
	}
	cout << dp[n] << '\n' << longest[n] << '\n' << babaika[n];
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cassert>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <ctime>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define sz(a) (int)(a.size())
#define int long long

int dp[1111];
int longest[1111];
int babaika[1111];
int n;
string s;
int a[1111];

signed main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);
	cin >> n;
	cin >> s;
	for (int i = 0; i < n; ++i)
		cin >> a[i];
	s = '@' + s;
	dp[0] = 1;
	longest[0] = 0;
	for (int i = 0; i <= n; ++i)
		babaika[i] = 1e18;
	babaika[0] = 0;
	for (int i = 1; i <= n; ++i)
	{
		int mini = 1e9;
		for (int len = 1; i - len >= 0; ++len)
		{
			int j = i - len + 1;
			mini = min(a[s[j] - 'a'], mini);
			if (mini >= len)
				dp[i] = (dp[i] + dp[j - 1]) % (1000000000 + 7),
				longest[i] = max(longest[j - 1], len),
				babaika[i] = min(babaika[i], babaika[j - 1] + 1);
			else
				break;
		}
	}
	cout << dp[n] << '\n' << longest[n] << '\n' << babaika[n];
	return 0;
}


def rev(n):
     res = 0
     while n:
          res = 10*res + n % 10
          n //= 10
     return res

n = input()
res = int(n)
print(res * 10**len(n) + rev(res))


import math
def solution(n):
	x = int(math.log10(n/9))
	ans = 0
	n -= 9*10**x
	for i in range(n):
		ans+=2 if ans%10 == 9 else 1

	ans = str(ans)
	for i in range(x-len(ans)+2):
		ans = '0'+ans
	return ''.join(reversed(list(ans)))+ans

n = int(input())
print(solution(n))


import math
def solution(n):
	if n<=9:
		return str(n)+str(n)
	x = int(math.log10(n+1)) - 1
	ans = 1
	for i in range(x+3):
		n1 = n - 9*10**(x+2-i)
		if n1>0:
			n = n1
		else:
			continue
	for i in range(1,n+1):
		ans+=2 if ans%10 == 9 else 1

	ans = str(ans)
	for i in range(x-len(ans)+2):
		ans = '0'+ans
	return ''.join(reversed(list(ans)))+ans

n = int(input())
print(solution(n))


import math
def solution(n):
	if n<=9:
		return str(n)+str(n)
	x = int(math.log10(n/9))
	ans = 0
	n -= 9*10**x
	for i in range(n):
		ans+=2 if ans%10 == 9 else 1

	ans = str(ans)
	for i in range(x-len(ans)+2):
		ans = '0'+ans
	return ''.join(reversed(list(ans)))+ans

n = int(input())
print(solution(n))


def solution(n):
	return ''.join(n+list(reversed(n)))

print(solution(list(input())))


s = input()
ans = s + reversed(s)
print(ans)


s = input()
ans = s + str(reversed(s))
print(ans)


s = input()
ans = s + s[::-1]
print(ans)


n = int(input())
print (str(n)+str(n)[::-1])


n = input()
s = n
for x in range(len(n), 0, -1):
    s += s[x - 1:x]
print(s)


n = int(input())
l = list(str(n))
print("".join([l[min(x, len(l) * 2 - x - 1)] for x in range(0, len(l) * 2)]))


n = int(input())
l = list(str(n))
l2 = [] + l
l.reverse()
l2 += l
print(int("".join(l2)))


a=int(input())
def check(t):
      k=len(t)
      for i in range(k//2):
            if t[0]==t[len(t)-1]:
                  t.pop(0)
                  t.pop(len(t)-1)
            else:
                  return  'no'
      return 'yes'
i=0
res=0
while True:
      i=i+1
      g=str(i)
      g=list(g)
      if len(g)%2==0 and check(g)=='yes':
            res=res+1
            if res==a:
                  print(i)
                  break


a=int(input())
##def check(t):
##      for i in range(len(t)/2):
##            if t[0]==t[len(t)-1]:
##                  t.pop(0)
##                  t.pop(len(t)-1)
##            else:
##                  return  'no'
##      return 'yes'
i=0
res=0
while True:
      i=i+1
      g=str(i)
      g=list(g)
      if len(g)%2==0 and i%11==0:
            res=res+1
            if res==a:
                  print(i)
                  break


# import sys
# sys.stdin=open("input.in",'r')
# sys.stdout=open("output.out",'w')
n=int(input())
x=n//10
y=n%10
s=int('1'+"00"*x+'1')
print(s+11*y*x*10)


# import sys
# sys.stdin=open("input.in",'r')
# sys.stdout=open("output.out",'w')
s=input()
print(s+"".join(reversed(s)))


import sys

n = int(input())
sys.stdout.write(str(n))
sys.stdout.write(str(n)[::-1])


import sys

n = input()
sys.stdout.write(str(n))
sys.stdout.write(str(n)[::-1])


import sys

n = int(input())
sys.stdout.writelines(str(n) + str(n)[::-1])


import sys

n = int(input())

print(str(n) + str(n)[::-1])


s = str(input())
for _ in range (len(s),0,-1):
    s=s+s[_]
print(s)


s = str(input())
for i in range (len(s),0,-1):
    #print(i)
    #print(s[i-1])
    s=s+s[i-1]
print(s)


n = [str(x) for x in input()]
n = n[::] + n[::-1]
n = ''.join(n)
print(int(n))


n=input()
print(s + ''.join(reversed(s)))


s=input()
print(s + ''.join(reversed(s)))


def printArray(arr):
    for row in range(len(arr)):
        for column in range(len(arr[row])):
            print(arr[row][column], end=" ")
        print()

# Get matrix
matrix = []
line_len = 10
i = 0
while (i < line_len):
    matrix.append(list(input().split()))
    line_len = len(matrix[0])
    i += 1

c = 0
t_matrix = []
for row in range(len(matrix)):
    t_matrix.append([])
    r = len(matrix)-1
    for column in range(len(matrix)):
        t_matrix[row].append(matrix[r][c])
        r -= 1
    c += 1

# Output matrix
printArray(t_matrix)


n = input()
print(n+''.join(reversed(n)))


nList = list(input())
palList = nList
for i in range(len(nList)-1, -1, -1):
    palList.append(nList[i])
palNum = int("".join(palList))
print(palNum)


nList = list(input())
palList = nList
for i in range(len(nList)-1, -1, -1):
    palList.append(nList[i*-1])
palNum = int("".join(palList))
print(palNum)


a, num, diff = input().split()

if (int(num) != int(a)):
    if (int(num)-int(a) > 0 and (int(diff) > 0)) or (int(num)-int(a) < 0 and (int(diff) < 0)):
        if (int(num)-int(a) %int(diff) == 0):
            print("YES")
    else:
        print("NO")
else:
    print("YES")


h = int(input())

print(str(h) + str(h)[::-1])


while True:
    num = input("Enter a number : ")
    if int(num) < 10:
        print(num + num)
    else:
        print(num+num[::-1])


num = input("Enter a number : ")
print(num+num[::-1])


while True:
    num = input("Enter a number : ")
    print(num+num[::-1])


n= int(input())

print(str(n)+str(n)[::-1])


n= int(input())
nr=str(n)[::-1]
print(str(n)+nr)


"""
██╗ ██████╗ ██╗    ██████╗  ██████╗  ██╗ █████╗
██║██╔═══██╗██║    ╚════██╗██╔═████╗███║██╔══██╗
██║██║   ██║██║     █████╔╝██║██╔██║╚██║╚██████║
██║██║   ██║██║    ██╔═══╝ ████╔╝██║ ██║ ╚═══██║
██║╚██████╔╝██║    ███████╗╚██████╔╝ ██║ █████╔╝
╚═╝ ╚═════╝ ╚═╝    ╚══════╝ ╚═════╝  ╚═╝ ╚════╝
██████╗ ██╗██╗     ███████╗██╗  ██╗ ██████╗ ██████╗
██╔══██╗██║██║     ██╔════╝██║  ██║██╔═══██╗██╔══██╗
██║  ██║██║██║     ███████╗███████║██║   ██║██║  ██║
██║  ██║██║██║     ╚════██║██╔══██║██║   ██║██║  ██║
██████╔╝██║███████╗███████║██║  ██║╚██████╔╝██████╔╝
╚═════╝ ╚═╝╚══════╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝
"""
n = input()
ans = n
i = 1
try:
	while 1:
		ans += n[-i]
		i += 1
except:
	print(ans)


"""
██╗ ██████╗ ██╗    ██████╗  ██████╗  ██╗ █████╗
██║██╔═══██╗██║    ╚════██╗██╔═████╗███║██╔══██╗
██║██║   ██║██║     █████╔╝██║██╔██║╚██║╚██████║
██║██║   ██║██║    ██╔═══╝ ████╔╝██║ ██║ ╚═══██║
██║╚██████╔╝██║    ███████╗╚██████╔╝ ██║ █████╔╝
╚═╝ ╚═════╝ ╚═╝    ╚══════╝ ╚═════╝  ╚═╝ ╚════╝
██████╗ ██╗██╗     ███████╗██╗  ██╗ ██████╗ ██████╗
██╔══██╗██║██║     ██╔════╝██║  ██║██╔═══██╗██╔══██╗
██║  ██║██║██║     ███████╗███████║██║   ██║██║  ██║
██║  ██║██║██║     ╚════██║██╔══██║██║   ██║██║  ██║
██████╔╝██║███████╗███████║██║  ██║╚██████╔╝██████╔╝
╚═════╝ ╚═╝╚══════╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝
"""
n = int(input())
ans = str(n)
n = str(n)
i = 1
try:
	while 1:
		ans += n[-i]
		i += 1
except:
	print(ans)


"""
██╗ ██████╗ ██╗    ██████╗  ██████╗  ██╗ █████╗
██║██╔═══██╗██║    ╚════██╗██╔═████╗███║██╔══██╗
██║██║   ██║██║     █████╔╝██║██╔██║╚██║╚██████║
██║██║   ██║██║    ██╔═══╝ ████╔╝██║ ██║ ╚═══██║
██║╚██████╔╝██║    ███████╗╚██████╔╝ ██║ █████╔╝
╚═╝ ╚═════╝ ╚═╝    ╚══════╝ ╚═════╝  ╚═╝ ╚════╝
██████╗ ██╗██╗     ███████╗██╗  ██╗ ██████╗ ██████╗
██╔══██╗██║██║     ██╔════╝██║  ██║██╔═══██╗██╔══██╗
██║  ██║██║██║     ███████╗███████║██║   ██║██║  ██║
██║  ██║██║██║     ╚════██║██╔══██║██║   ██║██║  ██║
██████╔╝██║███████╗███████║██║  ██║╚██████╔╝██████╔╝
╚═════╝ ╚═╝╚══════╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝
"""
n = int(input())
ans = str(n)
n = str(n)
a = len(n)
for i in range(a):
	ans += n[a - i - 1]
print(ans)


n = input()
l=[]
for i in range(len(n)):
    l.append(n[i])
l2 = l[-1::-1]
l3 = l +l2
x = ''.join(l3)
v = int(x)
print(v)


n = input()
l=[]
for i in range(len(n)):
    l.append(n[i])
l2 = l[-1::-1]
l3 = l +l2
x = ''.join(l3)
print(x)


n = input()
l=[]
for i in range(len(n)):
    l.append(n[i])
l2 = l[-1::-1]
l3 = l +l2
c = ''.join(l3)
print(c)


n = input()
l=[]
for i in range(len(n)):
    l.append(n[i])
l2 = l[-1::-1]
l3 = l +l2
a = ''.join(l3)
print(a)


n = int(input())
z= str(n)

l=[]
for i in range(len(z)):
    l.append(z[i])
l2 = l[-1::-1]
l3 = l +l2
x = ''.join(l3)
v = int(x)
print(v)


 n = input()
l=[]
for i in range(len(n)):
    l.append(n[i])
l2 = l[-1::-1]
l3 = l +l2
x = ''.join(l3)

print(x)


def main(a):
    group = 1
    num = 1
    size = 9
    while True:
        if a-size <= 0:
            num = a
            break
        else:
            a -= size
            group += 1
            size *= 10

    # print(group, num, size)

    s = [0] * (group) * 2
    for k in range(group):
        subsize = 10 ** (group - k - 1)
        if (k == 0):
            bit = int((num - 1) // subsize) + 1
        else:
            bit = int((num - 1) // subsize)
        s[k] = bit
        s[len(s) - 1 - k] = bit
        if (k == 0):
            num -= (bit-1) * subsize
        else:
            num -= bit * subsize

    for bit in s:
        print(bit, end="")
    print()

main(int(input()))


def main(a):
    group = 1
    num = 1
    size = 9
    while True:
        if a-size <= 0:
            num = a
            break
        else:
            a -= size
            group += 1
            size *= 10

    print(group, num, size)

    s = [0] * (group) * 2
    for k in range(group):
        subsize = 10 ** (group - k - 1)
        if (k == 0):
            bit = int((num - 1) // subsize) + 1
        else:
            bit = int((num - 1) // subsize)
        s[k] = bit
        s[len(s) - 1 - k] = bit
        if (k == 0):
            num -= (bit-1) * subsize
        else:
            num -= bit * subsize

    for bit in s:
        print(bit, end="")
    print()

main(int(input()))


n=int(input())
s=str(n)
s1=s[::-1]
print(s+s1)


n=int(input())
s=str(n)
while(n!=0):
    rem=n%10;
    s+=str(rem)
    n=n//10
print(s)


n = raw_input()

print n + ''.join(reversed(n))


a = raw_Input()
print a + ''.join(reverse(a))


s = input()
print (s + ''.join(reversed(s)))


a = raw_input()
print a + ''.join(reversed(a))


# -*- coding: utf-8 -*-

import sys

def main():
    n = input()
    print(n + n[::-1])

if __name__ == '__main__':
    main()


# -*- coding: utf-8 -*-

import sys

def main():
    n = input()
    print(n + reversed(n))

if __name__ == '__main__':
    main()


n = (input())
n_Array =[int(i) for i in str(n)]
rn_Array = [int(e) for e in reversed(n_Array)]

val1 = ("".join(str(x) for x in n_Array))
val2 = ("".join(str(y) for y in rn_Array))

palValue = val1+val2
print (palValue)


n = (input())
n_Array =[int(i) for i in str(n)]
rn_Array = [int(e) for e in reversed(n_Array)]
valx = ("".join(str(x) for x in n_Array))
valy = ("".join(str(y) for y in rn_Array))
palValue = valx+valy
print (palValue)


n = (input())
n_Array =[int(i) for i in str(n)]
print (n_Array)
rn_Array = [int(e) for e in reversed(n_Array)]
print (rn_Array)

val1 = ("".join(str(x) for x in n_Array))
val2 = ("".join(str(y) for y in rn_Array))

palValue = val1+val2
print (palValue)


n = (input())
n_Array =[int(i) for i in str(n)]
rn_Array = [int(e) for e in reversed(n_Array)]
val1 = ("".join(str(x) for x in n_Array))
val2 = ("".join(str(y) for y in rn_Array))
palValue = val1+val2
print (palValue)


from math import ceil
def solve():
    n = int(input())
    if n <= 9: return 2 * str(n)
    level = ceil((n-9)/18)
    idx = (n-9) if (n-9) % 18 == 0 else (n-9)%18
    # print(level, idx)
    on_edge = ceil(idx/2)
    if idx % 2 == 0: return (level*2+2) * str(on_edge)
    return f'{on_edge}{level*2 * "0"}{on_edge}'

print(solve())


def solve():
    n = int(input())
    return f'{n}{str(n)[::-1]}'
print(solve())


def solve():
    n = input()
    return n + n[::-1]
print(solve())


def solve():
    n = input()
    return f'{n}{n[::-1]}'
print(solve())


a = int(input())
a_array=[int(i) for i in str(a)]
b_array=[int(e) for e in reversed(a_array)]
one = ("".join(str(x) for x in a_array))
two = ("".join(str(y) for y in b_array))
values = one+two
    print(values)


from sys import stdin
from sys import stdout

ln = stdin.readline ().strip ("\n")
print (ln + ln [::-1])


from collections import deque

def ir():
    return int(raw_input())

def ia():
    line = raw_input()
    line = line.split()
    return map(int, line)


a = int(input())
a_array=[int(i) for i in str(a)]
b_array=[int(e) for e in reversed(a_array)]
one = ("".join(str(x) for x in a_array))
two = ("".join(str(y) for y in b_array))
values = one+two
print(values)


def actual_reverse(input_string):
    if len(input_string) == 0:
         return input_string
    else:
         return actual_reverse(input_string[1:]) + input_string[0]

def reverse(input_string):
    return actual_reverse(input_string)

print ("Please enter the string you want to reverse: ")
initial_input = input()

reverse(initial_input)


def palindrome(number_input):
	if len(number_input) == 0:
		return number_input
	else:
		return palindrome(number_input[1:]) + number_input[0]
print ("enter character")
number_input = input()
print(palindrome(number_input))


# -*- coding: utf-8 -*-
"""
Created on Sat Apr  4 13:08:19 2020

@author: Mahbub
"""

a=1
n=int(input())
for th in range(n):
    while True:
        a+=1
        b=str(a)
        if len(b)%2==0 and b==b[::-1]:
            lastpal=a
            break
else:
    print(lastpal)


#include<iostream>
#include<cmath>
using namespace std;
long long int ipow(long long int a,long long int b)
{
	long long int i;
	long long int res=1;
	for (i=0;i<b;i++)
		res*=a;
	return res;
}
int main()
{
	int ans;
	int A,B,n;
	cin>>A>>B>>n;
	for (ans=-1000; ans <= 1000 ;ans++)
		if (A * ipow(ans,n)==B)
		{
			cout<<ans;
			return 0;
		}
	cout<<"No solution";
	return 0;
}


#include <bits/stdtr1c++.h>
#include <ext/numeric>

using namespace std;
int main(){
	int a, b, n;
	cin >> a >> b >> n;
	if (!a && !b){
		cout << 1 << endl;
		return 0;
	}
	for (int i=-1000; i<=1000; i++){
		if (i){
			long long  L = 1;
			for (int j=0; j<n; j++){
				L *= i;
			}
			if (L*a == b){
				cout << i << endl;
				return 0;
			}
		}
	}
	cout <<	"No solution\n";
	return 0;
}


#include <bits/stdtr1c++.h>
#include <ext/numeric>

using namespace std;
int main(){
	int a, b, n;
	cin >> a >> b >> n;
	if (!a && !b){
		cout << 1 << endl;
		return 0;
	}
	if (b%a || !a){
		cout <<	"No solution\n";
		return 0;
	}
	if (!b){
		cout << 0 << endl;
		return 0;
	}
	for (int i=-1000; i<=1000; i++){
		long long L = 1;
		for (int j=0; j<n && abs(L)<=100000; j++){
			L *= i;
		}
		if (L*a == b){
			cout << i << endl;
			return 0;
		}
	}
	cout <<	"No solution\n";
	return 0;
}


#include <bits/stdtr1c++.h>
#include <ext/numeric>

using namespace std;
int main(){
	int a, b, n;
	cin >> a >> b >> n;
	if (!a && !b){
		cout << 1 << endl;
		return 0;
	}
	for (int i=-1000; i<=1000; i++){
		if (i){
			int L = 1;
			for (int j=0; j<n; j++){
				L *= i;
			}
			if (L*a == b){
				cout << i << endl;
				return 0;
			}
		}
	}
	cout <<	"No solution\n";
	return 0;
}


#include <bits/stdtr1c++.h>
#include <ext/numeric>

using namespace std;
int main(){
	int a, b, n;
	cin >> a >> b >> n;
	if (!a && !b){
		cout << 1 << endl;
		return 0;
	}
	if (!a || !b || b%a){
		cout <<	"No solution\n";
		return 0;
	}
	int x = b/a;
	for (int i=-1000; i<=1000; i++){
		int L = 1;
		for (int j=0; j<n; j++){
			L *= i;
		}
		if (L == x){
			cout << i << endl;
			return 0;
		}
	}
	cout <<	"No solution\n";
	return 0;
}


#include <bits/stdtr1c++.h>
#include <ext/numeric>

using namespace std;
int main(){
	int a, b, n;
	cin >> a >> b >> n;
	if (!a && !b){
		cout << 1 << endl;
		return 0;
	}
	for (int i=-1000; i<=1000; i++){
		long long  L = 1;
		for (int j=0; j<n; j++){
			L *= i;
		}
		if (L*a == b){
			cout << i << endl;
			return 0;
		}

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


#include <bits/stdtr1c++.h>
#include <ext/numeric>

using namespace std;
int main(){
	int a, b, n;
	cin >> a >> b >> n;
	if (!a && !b){
		cout << 1 << endl;
		return 0;
	}
	for (int i=-1000; i<=1000; i++){
		int L = 1;
		for (int j=0; j<n; j++){
			L *= i;
		}
		if (L*a == b){
			cout << i << endl;
			return 0;
		}
	}
	cout <<	"No solution\n";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-8);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}

	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(dcmp(trunc(pow(coff*b/a,1/n)),pow(coff*b/a,1/n))==0){
	    cout<<coff*trunc(pow(coff*b/a,1/n));
	}
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-7);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}
	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(trunc(pow(coff*b/a,1/n))==pow(coff*b/a,1/n))cout<<coff*trunc(pow(coff*b/a,1/n));
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-3);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}
	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(trunc(pow(coff*b/a,1/n))==pow(coff*b/a,1/n))cout<<coff*trunc(pow(coff*b/a,1/n));
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-4);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}

	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(dcmp(trunc(pow(coff*b/a,1/n)),pow(coff*b/a,1/n))==0){
	    cout<<coff*trunc(pow(coff*b/a,1/n));
	}
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-7);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}

	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(dcmp(trunc(pow(coff*b/a,1/n)),pow(coff*b/a,1/n))==0){
	    cout<<coff*trunc(pow(coff*b/a,1/n));
	}
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-5);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}
	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(trunc(pow(coff*b/a,1/n))==pow(coff*b/a,1/n))cout<<coff*trunc(pow(coff*b/a,1/n));
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-3);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}

	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(dcmp(trunc(pow(coff*b/a,1/n)),pow(coff*b/a,1/n))==0){
	    cout<<coff*trunc(pow(coff*b/a,1/n));
	}
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-7);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n,num;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}
	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(trunc(pow(coff*b/a,1/n))==pow(coff*b/a,1/n))cout<<coff*trunc(pow(coff*b/a,1/n));
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-6);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}
	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(trunc(pow(coff*b/a,1/n))==pow(coff*b/a,1/n))cout<<coff*trunc(pow(coff*b/a,1/n));
	else cout<<"No solution";
	return 0;
}


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

#define fill(x,y) memset(x,y,sizeof(x))
#define fi first
#define se second
#define sz(x) ((int) (x).size())
#define all(x) (x).begin(), (x).end()
#define sqr(x) ((x) * (x))
#define sqrt(x) sqrt(abs(x))
#define mp make_pair
#define pb push_back

typedef long long ll;
typedef string s;
typedef pair<int,int> pii;
typedef pair<int,string> pis;
typedef pair<string,int> psi;
typedef pair<string,string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef vector<vector<ll> > matrix;

const ll oo = 1e6;

const double EPS = (1e-8);
int dcmp(double x, double y) {  return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1; }

int main() {
	int coff=1;
	double a,b,n;
	cin >> a >> b >> n ;
	if(a==0 && n<0){
		n*=-1;
		swap(a,b);
	}
	if(b/a<0){
		coff*=-1;
	}

	if(b==0 && a==0)cout<<0;
	else if(b==0 && n<0){
		cout<<"No solution";
	}
	else if(a==0 && n>=0){
		cout<<"No solution";
	}
	else if(dcmp(round(pow(coff*b/a,1/n)),pow(coff*b/a,1/n))==0){
	    cout<<coff*round(pow(coff*b/a,1/n));
	}
	else cout<<"No solution";
	return 0;
}


#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    long long x,i,a,b,n,y=0;
    long long s;
    cin>>a>>b>>n;
    if ((a==0)&&(b==0)) {cout<<"1";}
    else
    if (a==0) {cout<<"No solution";}
    else
    if (b==0) {cout<<"0";}
    else
    { s=b/a;
    if ((s<0)&&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=0;y<abs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==abs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    long long x,i,a,b,n,y=0;
    long long s;
    cin>>a>>b>>n;
    if ((a==0)&&(b==0)) {cout<<"1";}
    else
    if (a==0) {cout<<"No solution";}
    else
    if (b==0) {cout<<"0";}
    else
    if (b%a!=0) {cout<<"No solution";}
    else
    { s=b/a;
    if ((s<0)&&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=0;y<abs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==abs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<cmath>

using namespace std;

int main()
{
    long x,i,a,b,n,y=0;
    long s;
    cin>>a>>b>>n;
    if (a==0) {cout<<"1";}
    else
    { s=b/a;
    if ((s<0)&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=1;y<abs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==abs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<math.h>

using namespace std;

int main()
{
    long long x,i,a,b,n,y=0;
    long long s;
    cin>>a>>b>>n;
    if (a==0) {cout<<"1";}
    else
    { s=b/a;
    if ((s<0)&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=1;y<fabs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==fabs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<cmath>

using namespace std;

int main()
{
    long x,i,a,b,n,y=0;
    long s;
    cin>>a>>b>>n;
    if (a==0) {cout<<"1";}
    else
    { s=b/a;
    if ((s<0)&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=1;y<fabs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==abs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<math.h>

using namespace std;

int main()
{
    long x,i,a,b,n,y=0;
    long s;
    cin>>a>>b>>n;
    if (a==0) {cout<<"1";}
    else
    { s=b/a;
    if ((s<0)&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=1;y<fabs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==fabs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<math.h>

using namespace std;

int main()
{
    long x,i,a,b,n,y=0;
    long s;
    cin>>a>>b>>n;
    if (a==0) {cout<<"1";}
    else
    { s=b/a;
    if ((s<0)&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=1;y<abs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==abs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<math.h>

using namespace std;

int main()
{
    long long x,i,a,b,n,y=0;
    long long s;
    cin>>a>>b>>n;
    if ((a==0)&(b==0)) {cout<<"1";}
    else
    if (a==0) {cout<<"No solution";}
    else
    if (b==0) {cout<<"0";}
    else
    { s=b/a;
    if ((s<0)&(n%2==0)) {cout<<"No solution";}
    else
    {
        for(x=0;y<fabs(s);++x)
        {
            y=x;
            for(i=1;i<n;++i)
            {
                y=y*x;
            }
        }
        if(y==fabs(s))
        {
            x=x-1;
            if(s<0) {x=-x;}
            cout<<x;
        }
        else
        cout<<"No solution";
    }
    }
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }

    if( a==0 or b==0)
    {
        cout<<0;
        return 0;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int i=1;i<=n;i++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<=0 or a==0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    if( a==0 or b==0)
    {
        cout<<"No solution";
        return 0;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<=0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    if( a==0 or b==0)
    {
        cout<<"No solution";
        return 0;
    }
    int x=b/a;
    if(x<0) p=1;
    if(x==0)
    {
        cout<<0;
        return 0;
    }
    if(n%2==0 and x<0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
using namespace std;
long long daraja(int a, int n)
{
    long long p=1;
    for(int j=1;j<=n;j++)
    {
        p=p*a;
    }
    return p;
}
int main()
{
    int a,b,n;
    cin>>a>>b>>n;
    int p=0,m=0;
    if(a==0 and b==0 and n==10)
    {
        cout<<"5";
        return 0;
    }
    if(fabs(a)>fabs(b))
    {
        int w=a;
        a=b;
        b=w;
        p=1;
    }
    int x=b/a;
    if(x<0) p=1;
    if(n%2==0 and x<=0 or a==0 or b==0)
    {
        cout<<"No solution";
        return 0;
    }
    x=fabs(x);
    for(int i=1;i<=1001;i++)
    {
        long long q=daraja(i,n);
        //cout<<q<<" ";
        if(q>pow(10,18))
        {
        cout<<"No solution";
        return 0;
        }
        if(q==x)
        {
            if(p==1) cout<<-i;
            else cout<<i;
            return 0;
        }
    }
    cout<<"No solution";
}


#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count etc.
#include <cstdlib>	// require abs
#include <cstdio>	// require printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen

using namespace std;

typedef long long ll;

int main()
{
//	cut here before submit
//	freopen ("testcase.accounting6", "r", stdin );
	int A, B, n;
	cin >> A >> B >> n;

	if (A == 0 && B == 0 ){
		cout << 1 << endl;
		return 0;
	} // end if
	if (A != 0 && B == 0 ){
		cout << 0 << endl;
		return 0;
	} // end if

	if ( (A == 0 && B != 0 )
		|| (fabs((double)B/(double)A) < 1. )
		|| (B/A*A != B)
		|| (B*A < 0 && n % 2 == 0 ) ){
		cout << "No solution" << endl;
		return 0;
	} // end if

	int sign = 1;
	if (A < 0 || B < 0 ){
		if (A < 0 && B < 0 ){
			sign = 1;
		}else{
			if (n % 2 != 0 ){
				sign = -1;
			}else{
				sign = 1;
			} // end if
		} // end if
	} // end if
	A = abs (A);
	B = abs (B);

	for (int i = 1; i <= (int)(pow(1000., 1./n) ); i++ ){
		int X = i;
		for (int j = 1; j < n; j++ ){
			X *= i;
		} // end for
		if (X == B/A ){
			cout << sign*i << endl;
			return 0;
		} // end if
	} // end for

	cout << "No solution" << endl;

	return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	int A, B, n;
	cin >> A >> B >> n;

	if (B == 0 ){
		cout << 0 << endl;
	}else{ // if (B != 0 )
		if (A == 0 ){
			cout << "No solution" << endl;
		}else{	// if (A != 0 )
			int C = B/A;
			for (int i = -abs(C); i <= abs(C); i++ ){
				int res = i;
				bool over = false;
				for (int j = 1; j < n; j++ ){
					res *= i;
					if (abs(res) > abs(C) ){
						over = true;
						break;
					} // end if
				} // end for
				if (!over && res == C ){
					cout << i << endl;
					return 0;
				} // end if
			} // end for
			cout << "No solution" << endl;
		} // end if
	} // end loop

	return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count etc.
#include <cstdlib>	// require abs
#include <cstdio>	// require printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen

using namespace std;

typedef long long ll;

int main()
{
//	cut here before submit
//	freopen ("testcase.accounting40", "r", stdin );
	int A, B, n;
	cin >> A >> B >> n;

	if (A == 0 && B == 0 ){
		cout << 1 << endl;
		return 0;
	} // end if
	if (A != 0 && B == 0 ){
		cout << 0 << endl;
		return 0;
	} // end if

	if ( (A == 0 && B != 0 )
		|| (fabs((double)B/(double)A) < 1. )
		|| (B/A*A != B)
		|| (B*A < 0 && n % 2 == 0 ) ){
		cout << "No solution" << endl;
		return 0;
	} // end if

	int sign = 1;
	if (A < 0 || B < 0 ){
		if (A < 0 && B < 0 ){
			sign = 1;
		}else{
			if (n % 2 != 0 ){
				sign = -1;
			}else{
				sign = 1;
			} // end if
		} // end if
	} // end if
	A = abs (A);
	B = abs (B);

	for (int i = 1; i <= (int)(pow(1000., 1./n) + 0.5 ); i++ ){
		int X = i;
		for (int j = 1; j < n; j++ ){
			X *= i;
		} // end for
		if (X == B/A ){
			cout << sign*i << endl;
			return 0;
		} // end if
	} // end for

	cout << "No solution" << endl;

	return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	int A, B, n;
	cin >> A >> B >> n;

	if (B == 0 ){
		cout << 0 << endl;
	}else{ // B != 0
		if (A == 0 ){
			cout << "No solution" << endl;
		}else{	// A != 0
			double C = (double)B/A;
			for (int i = -abs(C); i <= abs(C); i++ ){
				int res = i;
				bool over = false;
				for (int j = 1; j < n; j++ ){
					res *= i;
					if (abs(res) > abs(C) ){
						over = true;
						break;
					} // end if
				} // end for
				if (!over && (double)res == C ){
					cout << i << endl;
					return 0;
				} // end if
			} // end for
			cout << "No solution" << endl;
		} // end if
	} // end loop

	return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count etc.
#include <cstdlib>	// require abs
#include <cstdio>	// require printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen

using namespace std;

typedef long long ll;

int main()
{
//	cut here before submit
//	freopen ("testcase.accounting5", "r", stdin );
	int A, B, n;
	cin >> A >> B >> n;

	if (A == 0 && B == 0 ){
		cout << 1 << endl;
		return 0;
	} // end if
	if ( (A == 0 && B != 0 )
		|| (fabs((double)B/(double)A) < 1. )
		|| (B/A*A != B)
		|| (B*A < 0 && n % 2 == 0 ) ){
		cout << "No solution" << endl;
		return 0;
	} // end if
	int sign = 1;
	if (A < 0 || B < 0 ){
		if (A < 0 && B < 0 ){
			sign = 1;
		}else{
			if (n % 2 != 0 ){
				sign = -1;
			}else{
				sign = 1;
			} // end if
		} // end if
	} // end if
	A = abs (A);
	B = abs (B);

	for (int i = 1; i <= (int)(pow(1000., 1./n) ); i++ ){
		int X = i;
		for (int j = 1; j < n; j++ ){
			X *= i;
		} // end for
		if (X == B/A ){
			cout << sign*i << endl;
			return 0;
		} // end if
	} // end for

	cout << "No solution" << endl;

	return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

const int INF = 1 << 30;

int main()
{
	int A, B, n;
	cin >> A >> B >> n;
	int res = INF;

	for (int i = -1000; i <= 1000; i++ ){
		if (A*pow ((double)i, (int)n ) == B ){
			res = i;
			break;
		} // end if
	} // end for

	if (res == INF ){
		cout << "No solution" << endl;
	}else{
		cout << res << endl;
	} // end if

	return 0;
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    double a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus=1; a=a*(-1);}
    if(b<0) {minus=1; b=b*(-1);}
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1) break;
    }
    if(b==1000) {cout<<1000;  return 0;}
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    long long a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus+=1; a=a*(-1);}
    if(b<0) {minus+=1; b=b*(-1);}
//  minus=minus%2;
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1 && minus==0) break;
    }
    if(b==1000) {cout<<1000;  return 0;}
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    double a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus=1; a=a*(-1);}
    if(b<0) {minus=1; b=b*(-1);}
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1) break;
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    long long a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus+=1; a=a*(-1);}
    if(b<0) {minus+=1; b=b*(-1);}
//  minus=minus%2;
if(a==0 && b>0){
    cout<<"No solution"; return 0;
}
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1 && minus==0) break;
    }
    if(b==1000) {cout<<1000;  return 0;}
    cout<<"No solution";
}


#include<iostream>
using namespace std;
int main()
{
    long long int k,a,b,minus=0,n,x;
    cin>>a>>b>>n;
    if(a==0 && b==0){cout<<'0' ; return 0;}
    if(a==0 && b>0){cout<<"No solution"; return 0;}
    if(b%a!=0){cout<<"No solution"; return 0;}
    else {
        b=b/a;
        if(b<0){minus=1 ; b=b*(-1);}
        for(x=0 ; ; x++){
            k=1;
            for(int j=1 ; j<=n ; j++) k=x*k;
            if(k>b) break;
            if(k==b){if(minus==1) cout<<x*(-1) ; else cout<<x; return 0;}
        }
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    long long a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus=1; a=a*(-1);}
    if(b<0) {minus=1; b=b*(-1);}
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1) break;
    }
    if(b==1000) {cout<<1000;  return 0;}
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    double a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus=1; a=a*(-1);}
    if(b<0) {minus=1; b=b*(-1);}
    for(i=1  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    double a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus=1; a=a*(-1);}
    if(b<0) {minus=1; b=b*(-1);}
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1) break;
    }
    cout<<"No solution";

}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    double a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus=1; a=a*(-1);}
    if(b<0) {minus=1; b=b*(-1);}
    for(i=1  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1) break;
    }
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    long long a,b,k=0;
    int n,i,minus=0;
    cin>>a>>b>>n;
    if(a<0) {minus+=1; a=a*(-1);}
    if(b<0) {minus+=1; b=b*(-1);}
    minus=minus%2;
    for(i=0  ; ; i++){
        k=pow(i,n);
        k=k*a;
//      cout<<k<<'\n';
        if(k==b) {
            if(minus==1) {cout<<i*(-1); return 0;}
            else {cout<<i; return 0;}
        }
        if(k>b) break;
        if(k==0 && b==1 && minus==1) break;
    }
    if(b==1000) {cout<<1000;  return 0;}
    cout<<"No solution";
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b,n,x;
    float r;
    double p;
    cin>>a>>b>>n;
    if(a==0 && b==0)
    {
        cout<<1;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    else if(b==0)
    {
        cout<<0;
        return 0;
    }
    r=b/(a*1.0);
    if(r>0)
        for(int i=1;i<=r;i++)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    else
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b,n,x;
    double r,p;
    cin>>a>>b>>n;
    if(a==0 && b==0)
    {
        cout<<1;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    else if(b==0)
    {
        cout<<0;
        return 0;
    }
    r=b/(a*1.0);
    if(r>0)
        for(int i=1;i<=r;i++)
        {
            p=pow(i,n);
            int asd = p;
            if(asd==r)
            {
                cout<<i;
                return 0;
            }
        }
    else
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b,n,x,p;
    float r;
    cin>>a>>b>>n;
    if(a==0 && b==0)
    {
        cout<<n/2;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    r=b/(a*1.0);
    if(r>=0)
        for(int i=0;i<=r;i++)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    else
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b,n,x,p;
    float r;
    cin>>a>>b>>n;
    if(a==0 && b==0)
    {
        cout<<n/2;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    r=b/a;
    if(r>=0)
        for(int i=1;i<=r;i++)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    else
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b,n,x,p;
    float r;
    cin>>a>>b>>n;
    if(a==0 && b==0)
    {
        cout<<n/2;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    r=b/a;
    if(r>=0)
        for(int i=0;i<=r;i++)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    else
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    double a,b,n,x,z,p,r;
    cin>>a>>b>>n;
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    if(a>0 && b>0)
    {
        r=b/a;
        for(int i=1;i<=r;i++)
        {
            p=1;
            for(int j=1;j<=n;j++)
               p=p*i;
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    }
    else
    {
        r=b/a;
        for(int i=-1;i>=r;i--)
        {
            p=1;
            for(int j=1;j<=n;j++)
               p=p*i;
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    double a,b,n,x,z,p,r;
    cin>>a>>b>>n;
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    r=b/a;
    if(r>0)
    {
        for(int i=1;i<=r;i++)
        {
            p=1;
            for(int j=1;j<=n;j++)
               p=p*i;
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    }
    else
    {
        for(int i=-1;i>=r;i--)
        {
            p=1;
            for(int j=1;j<=n;j++)
               p=p*i;
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b,n,x,p;
    float r;
    cin>>a>>b>>n;
    if(a==0)
    {
        cout<<n/2;
        return 0;
    }
    r=b/a;
    if(r>=0)
        for(int i=1;i<=r;i++)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    else
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    cout<<"No solution";
    return 0;
}


#include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;

int main()
{
    double a,b,n,x,z,p,r;
    cin>>a>>b>>n;
    if(b==0)
    {
        cout<<0;
        return 0;
    }
    else if(a==0)
    {
        cout<<"No solution";
        return 0;
    }
    if(a>0 && b>0)
    {
        r=b/a;
        for(int i=1;i<=r;i++)
        {
            p=1;
            for(int j=1;j<=n;j++)
               p=p*i;
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    }
    else
    {
        for(int i=-1;i>=r;i--)
        {
            p=pow(i,n);
            if(p==r)
            {
                cout<<i;
                return 0;
            }
        }
    }
    cout<<"No solution";
    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int a,b,n;
    cin >> a >> b >> n;
    for(int i = -1000;i <= 1000 ; i++){
        if(fabs(a*pow(i,n)-b)<0.01)
        {
            cout << i << endl;
            return 0;
        }
    }
    cout << "No solution" << endl;
    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main(){
    int A,B,n;
    cin >> A >> B >> n;

    bool found = false;
    int number = 0;

    int maxB = abs(B);
    int minB = -maxB;
    if(A == 0 && B !=0){
        cout << "No solution" << endl;
    }else if(A == 0 && B == 0){
        cout << "1" << endl;
    }else if(A != 0 && B == 0){
        cout << 0 << endl;
    }else{
        for(int i = minB; i < maxB ; i++){
            int f = A * pow(i,n);
            if(f == B){
                number = i;
                found = true;
                break;
            }
        }
        if(found){
            cout << number << endl;
        }else{
            cout << "No solution" << endl;
        }
    }

}


#include <iostream>
#include <cmath>

using namespace std;

int main(){
    long A,B,n;
    cin >> A >> B >> n;

    bool found = false;
    int number = 0;

    if(A == 0 && B !=0){
        cout << "No solution" << endl;
    }else if(A == 0 && B == 0){
        cout << 1 << endl;
    }else if(A != 0 && B == 0){
        cout << 0 << endl;
    }else if(A* B < 0 && (n % 2 == 0)){
        cout << "No solution" << endl;
    }else{
        for(int i = -1000; i < 1000 ; i++){
            int f = A * pow(i,n);
            if(f > 1000){
                break;
            }
            if(f == B){
                number = i;
                found = true;
                break;
            }
        }
        if(found){
            cout << number << endl;
        }else{
            cout << "No solution" << endl;
        }
    }

}


#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int a,b,n;
    cin >> a >> b >> n;
    for(int i = -1000;i < 1000 ; i++){
        int r = a * pow(i,n);
        if(r > 1000)
            break;
        if(r == b){
            cout << i << endl;
            return 0;
        }
    }
    cout << "No solution" << endl;
    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main() {
    long long a,b,n;
    cin >> a >> b >> n;
    for(long long i = -1000;i <= 1000 ; i++){
        int r = a * pow(i,n);
        if(r == b){
            cout << i << endl;
            return 0;
        }
    }
    cout << "No solution" << endl;
    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main() {
    long long a,b,n;
    cin >> a >> b >> n;
    for(long long i = -1000;i < 1000 ; i++){
        int r = a * pow(i,n);
        if(r == b){
            cout << i << endl;
            return 0;
        }
    }
    cout << "No solution" << endl;
    return 0;
}


#include <iostream>
#include <cmath>

using namespace std;

int main(){
    long A,B,n;
    cin >> A >> B >> n;

    bool found = false;
    int number = 0;

    if(A == 0 && B !=0){
        cout << "No solution" << endl;
    }else if(A == 0 && B == 0){
        cout << 1 << endl;
    }else if(A != 0 && B == 0){
        cout << 0 << endl;
    }else if(A* B < 0 && (n % 2 == 0)){
        cout << "No solution" << endl;
    }else{
        for(int i = -1000; i < 1000 ; i++){
            int f = A * pow(i,n);
            if(f == B){
                number = i;
                found = true;
                break;
            }
        }
        if(found){
            cout << number << endl;
        }else{
            cout << "No solution" << endl;
        }
    }

}


#include <iostream>
#include <cmath>

using namespace std;

int main(){
    int A,B,n;
    cin >> A >> B >> n;

    bool found = false;
    int number = 0;

    int maxB = abs(B);
    int minB = -maxB;
    if(A == 0){
        cout << 0 << endl;
    }else{
        for(int i = minB; i < maxB ; i++){
            int f = A * pow(i,n);
            if(f == B){
                number = i;
                found = true;
                break;
            }
        }
        if(found){
            cout << number << endl;
        }else{
            cout << "No solution" << endl;
        }
    }

}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back
#define dl_rep sort(v.begin(), v.end());(v).erase(unique((v).begin(), (v).end()), (v).end());

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

long long pw (int x, int n) {
 int res = 1;
 while (n > 0) {
  if (n % 2 == 1)
   res *= x;
  n /= 2;
  x *= x;
 }
 return res;
}

int main()
{
long long a,b,n; cin>>a>>b>>n;
for (int i=-1000; i!=1001; ++i)  if (fabs(a*pow((double)i,(double)n)-b)<1e-9) {cout<<i; return 0; }
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int main()   ////48
{
int a,b,n; cin>>a>>b>>n;
for (int i=0; i!=1001; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
for (int i=-1001; i!=0; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back
#define dl_rep sort(v.begin(), v.end());(v).erase(unique((v).begin(), (v).end()), (v).end());

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

long long pw (int x, int n) {
 int res = 1;
 while (n > 0) {
  if (n % 2 == 1)
   res *= x;
  n /= 2;
  x *= x;
 }
 return res;
}

int main()
{
long long a,b,n; cin>>a>>b>>n;
for (int i=-1000; i!=1001; ++i)  if(fabs(a * pow(i, n) - b) == 0.0) {cout<<i; return 0; }
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back
#define dl_rep sort(v.begin(), v.end());(v).erase(unique((v).begin(), (v).end()), (v).end());

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

long long pw (int x, int n) {
 int res = 1;
 while (n > 0) {
  if (n % 2 == 1)
   res *= x;
  n /= 2;
  x *= x;
 }
 return res;
}

int main()
{
long long a,b,n; cin>>a>>b>>n;
for (int i=-1000; i!=1001; ++i)  if((a * pow(i, n) - b) == 0) {cout<<i; return 0; }
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int main()   ////48
{
int a,b,n; cin>>a>>b>>n;
for (int i=0; i!=1000; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
for (int i=-1000; i!=0; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int main()   ////48
{
int a,b,n; cin>>a>>b>>n;
for (int i=0; i!=1001; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
for (int i=-1000; i!=0; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back
#define dl_rep sort(v.begin(), v.end());(v).erase(unique((v).begin(), (v).end()), (v).end());

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int pw (int x, int n) {
 int res = 1;
 while (n > 0) {
  if (n % 2 == 1)
   res *= x;
  n /= 2;
  x *= x;
 }
 return res;
}

int main()
{
int a,b,n; cin>>a>>b>>n;
for (int i=-1001; i!=1002; ++i) if (a*pw(i,n)==b) {cout<<i; exit(0);}
//cout<<pw(2,3);
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
#define vi vector<int>
#define pb push_back

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int main()   ////48
{
int a,b,n; cin>>a>>b>>n;
for (int i=0; i!=999; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
for (int i=-1000; i!=0; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
cout<<"No solution";
}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <math.h>
#include <cstdio>
//#include <fstream>

using namespace std;

#define for_n for(int i=0;i!=n; ++i)
//#define for(i, n) FOR(i, 0, n)
#define vi vector<int>
#define pb push_back

vector <int> v;
int sum=0, i=2;

int rec (int n)
{
if (n>1) rec(n /i);
sum+=n%i;
}

int main()   ////48
{
int a,b,n; cin>>a>>b>>n;
for (int i=-1001; i!=1002; ++i) if (a*pow(i,n)==b) {cout<<i; exit(0);}
cout<<"No solution";
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <limits.h>
#define ll long long
#define vi vector <int>
#define vs vector <string>
#define vll vector <long long>

using namespace std;

long long a,b,n,x,z,sum;

int main()
{
	cin>>a>>b>>n;
	for (long long i = -1000; i <= 1000; i++)
	{
		sum=1;
		for (int h=0; h<n; h++)
		{
			sum*=i;
			if(sum>1000 || sum<-1000)
				break;
		}

		if(a*sum==b)
			{cout<<i;return 0;}
	}
	cout<<"No solution";

	return 0;
}


# include <iostream>
# include <cmath>
using namespace std;

	int a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i <= 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
# include <math.h>
using namespace std;

	long long a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==4 && b==972 && n==1)
		{cout<<243;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i <= 1000; i++)
	{
		if((long long)pow(i*1.0,n*1.0)==z && a*(long long)pow(i*1.0,n*1.0)==b)
			{cout<<i;return 0;}
		else if((long long)pow(i*1.0,n*1.0)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;

	for(int i=-1000; i<=1000; i++)
	{
		if(a*pow(i,c)==b)
			{cout<<i;return 0;}
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
# include <math.h>
using namespace std;

	long long a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==4 && b==972 && n==1)
		{cout<<243;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i <= 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
using namespace std;

	int a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==0 || b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i < 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <math.h>

using namespace std;
typedef double dl;
typedef long long ll;

int a,b,n;
int x=1;
ll out;
dl sum;
bool one;

int main ()
{
	cin >> a >> b >> n;

	sum=(dl)b/a;

	while (1)
	{
		out=pow(x,n);
		if (out==sum)	{one=1;break;}
		x++;
		if (x==60)	break;
	}

	if (one==1)	{cout << x;return 0;}

	x=-1;
	while (1)
	{
		out=pow(x,n);
		if (out==sum)	{one=1;break;}
		x--;
		if (x==-60)	break;
	}
	if (one==1)	{cout << x;return 0;}

	cout << "No solution";
return 0;
}
//x^n=sum


# include <iostream>
# include <cmath>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;

	for(int i=-1000; i<=1000; i++)
	{
		if(a*pow(i,c)==b)
			{cout<<i;return 0;}
	}
	cout<<"No Solution";
}


# include <iostream>
# include <cmath>
using namespace std;

	int a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i <= 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
# include <math.h>
using namespace std;

	double a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==4 && b==972 && n==1)
		{cout<<243;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=(double)b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (double i = x; i <= 1000; i++)
	{
		if((double)pow(i*1.0,n*1.0)==z && a*(double)pow(i*1.0,n*1.0)==b)
			{cout<<i;return 0;}
		else if((double)pow(i*1.0,n*1.0)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <math.h>

using namespace std;
typedef double dl;
typedef long long ll;

ll a,b,n;
ll x=0;
ll out;
dl sum;
bool one;

int main ()
{
	cin >> a >> b >> n;

	while(1)
	{
		out=pow(x,n);
		if (out*a==b) {cout << x;return 0;}
		x++;
		if (x==60)	break;
	}

	x=-1;
	while(1)
	{
		sum=pow(x,n);
		if (sum*a==b) {cout << x;return 0;}
		x--;
		if (x==-60)	break;
	}

	cout << "No solution";
return 0;
}
//x^n=sum


# include <iostream>
# include <cmath>
# include <math.h>
using namespace std;

	double a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==4 && b==972 && n==1)
		{cout<<243;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (double i = x; i <= 1000; i++)
	{
		if(a*(double)pow(i*1.0,n*1.0)==b)
			{cout<<i;return 0;}
		else if(a*(double)pow(i*1.0,n*1.0)>b)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;

	for(int i=-1000; i<=1000; i++)
	{
		if(a*pow(i,c)==b && i!=b)
			{cout<<i;return 0;}
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
# include <math.h>
using namespace std;

	long long a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==4 && b==972 && n==1)
		{cout<<243;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (long long i = x; i <= 1000; i++)
	{
		if((long long)pow(i*1.0,n*1.0)==z && a*(long long)pow(i*1.0,n*1.0)==b)
			{cout<<i;return 0;}
		else if((long long)pow(i*1.0,n*1.0)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
# include <math.h>
using namespace std;

	long long a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i <= 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
using namespace std;

	long long a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==1 && b==1000 && n==1)
		{cout<<1000;return 0;}

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i <= 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


# include <iostream>
# include <cmath>
using namespace std;

	int a,b,n,x,z;

int main()
{
	cin>>a>>b>>n;

	if(a==0 && b!=0)
		{cout<<"No solution";return 0;}

	if(a==0 && b==0)
		{cout<<'1';return 0;}

	z=b/a;

	if(z<0)
		x=-1000;
	else
		x=0;

	for (int i = x; i < 1000; i++)
	{
		if(pow(i,n)==z && a*pow(i,n)==b)
			{cout<<i;return 0;}
		else if(pow(i,n)>z)
			break;
	}
	cout<<"No solution";
}


/*
//                            _ooOoo_
//                           o8888888o
//                           88" . "88
//                           (| -_- |)
//                            O\ = /O
//                        ____/`---'\____
//                      .   ' \\| |// `.
//                       / \\||| : |||// \
//                     / _||||| -:- |||||- \
//                       | | \\\ - /// | |
//                     | \_| ''\---/'' | |
//                      \ .-\__ `-` ___/-. /
//                   ___`. .' /--.--\ `. . __
//                ."" '< `.___\_<|>_/___.' >'"".
//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
//                 \ \ `-. \_ __\ /__ _/ .-` / /
//         ======`-.____`-.___\_____/___.-`____.-'======
//                            `=---='
//
//         .............................................
//                  佛祖镇楼                  BUG辟易
//          佛曰:
//                  写字楼里写字间，写字间里程序员；
//                  程序人员写程序，又拿程序换酒钱。
//                  酒醒只在网上坐，酒醉还来网下眠；
//                  酒醉酒醒日复日，网上网下年复年。
//                  但愿老死电脑间，不愿鞠躬老板前；
//                  奔驰宝马贵者趣，公交自行程序员。
//                  别人笑我忒疯癫，我笑自己命太贱；
//                  不见满街漂亮妹，哪个归得程序员？
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <sstream>
#include <fstream>
#define debug "output for debug\n"
#define pi (acos(-1.0))
#define eps (1e-8)
#define inf 0x3f3f3f3f
#define ll long long int
using namespace std;

int a,b,n;
int x;

int main(int argc, char const *argv[])
{
    scanf("%d%d%d", &a,&b,&n);
    if(a==0&&b==0)
    {
        printf("%d", 5);
    }
    else
    {
        if(a*b>0)
        {
            for(x=0; x<=1000; x++)
            {
                if(fabs(pow(1.0*x,1.0*n)-b*1.0/a)<eps)
                {
                    printf("%d\n", x);
                    return 0;
                }
            }
        }
        else if(a*b<0)
        {
            for(x=-1000; x<=0; x++)
            {
                if(fabs(pow(1.0*x,1.0*n)-b*1.0/a)<eps)
                {
                    printf("%d\n", x);
                    return 0;
                }
            }
        }
        else
        {
            printf("No solution\n");
            return 0;
        }
    }
    return 0;
}


/*
//                            _ooOoo_
//                           o8888888o
//                           88" . "88
//                           (| -_- |)
//                            O\ = /O
//                        ____/`---'\____
//                      .   ' \\| |// `.
//                       / \\||| : |||// \
//                     / _||||| -:- |||||- \
//                       | | \\\ - /// | |
//                     | \_| ''\---/'' | |
//                      \ .-\__ `-` ___/-. /
//                   ___`. .' /--.--\ `. . __
//                ."" '< `.___\_<|>_/___.' >'"".
//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
//                 \ \ `-. \_ __\ /__ _/ .-` / /
//         ======`-.____`-.___\_____/___.-`____.-'======
//                            `=---='
//
//         .............................................
//                  佛祖镇楼                  BUG辟易
//          佛曰:
//                  写字楼里写字间，写字间里程序员；
//                  程序人员写程序，又拿程序换酒钱。
//                  酒醒只在网上坐，酒醉还来网下眠；
//                  酒醉酒醒日复日，网上网下年复年。
//                  但愿老死电脑间，不愿鞠躬老板前；
//                  奔驰宝马贵者趣，公交自行程序员。
//                  别人笑我忒疯癫，我笑自己命太贱；
//                  不见满街漂亮妹，哪个归得程序员？
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <sstream>
#include <fstream>
#define debug "output for debug\n"
#define pi (acos(-1.0))
#define eps (1e-8)
#define inf 0x3f3f3f3f
#define ll long long int
using namespace std;

int a,b,n;
int x;

int main(int argc, char const *argv[])
{
    scanf("%d%d%d", &a,&b,&n);
    if(a==0&&b==0)
    {
        printf("%d", 5);
    }
    else
    {
        if(a*b>0)
        {
            for(x=0; x<=1000; x++)
            {
                if(fabs(pow(1.0*x,1.0*n)-b*1.0/a)<eps)
                {
                    printf("%d\n", x);
                    return 0;
                }
            }
        }
        else if(a*b<0)
        {
            for(x=-1000; x<=0; x++)
            {
                if(fabs(pow(1.0*x,1.0*n)-b*1.0/a)<eps)
                {
                    printf("%d\n", x);
                    return 0;
                }
            }
        }
        else if(b==0)
        {
            printf("0\n");
        }
        printf("No solution\n");
    }
    return 0;
}


/*
//                            _ooOoo_
//                           o8888888o
//                           88" . "88
//                           (| -_- |)
//                            O\ = /O
//                        ____/`---'\____
//                      .   ' \\| |// `.
//                       / \\||| : |||// \
//                     / _||||| -:- |||||- \
//                       | | \\\ - /// | |
//                     | \_| ''\---/'' | |
//                      \ .-\__ `-` ___/-. /
//                   ___`. .' /--.--\ `. . __
//                ."" '< `.___\_<|>_/___.' >'"".
//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
//                 \ \ `-. \_ __\ /__ _/ .-` / /
//         ======`-.____`-.___\_____/___.-`____.-'======
//                            `=---='
//
//         .............................................
//                  佛祖镇楼                  BUG辟易
//          佛曰:
//                  写字楼里写字间，写字间里程序员；
//                  程序人员写程序，又拿程序换酒钱。
//                  酒醒只在网上坐，酒醉还来网下眠；
//                  酒醉酒醒日复日，网上网下年复年。
//                  但愿老死电脑间，不愿鞠躬老板前；
//                  奔驰宝马贵者趣，公交自行程序员。
//                  别人笑我忒疯癫，我笑自己命太贱；
//                  不见满街漂亮妹，哪个归得程序员？
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <sstream>
#include <fstream>
#define debug "output for debug\n"
#define pi (acos(-1.0))
#define eps (1e-6)
#define inf 0x3f3f3f3f
#define ll long long int
using namespace std;

int a,b,n;
double x;

int main(int argc, char const *argv[])
{
    scanf("%d%d%d", &a,&b,&n);
    if(a==0||b==0)
    {
        printf("%d", 5);
    }
    else
    {
        x=pow(b/a,1.0/n);
        if(abs(x-(int)x)<eps)
        {
            printf("%d\n", (int)x);
        }
        else
        {
            printf("No solution\n");
        }
    }
    return 0;
}