#include<cstring>
#include<cstdio>
#include<string>
#include<iostream>
using namespace std;
long long text[150000];
long long n;
int m;
void mul(void)
{
for (int i = 149999; i >= 0; i--)
for (int j = 149999; j >= 0; j--)
text[j] +=text[j]*n;
for (int i = 199; i >= 0; i--)
{
if (i != 0)
text[i - 1] += text[i] / 10;
text[i] = text[i] % 10;
}
}
int main(){
memset(text, 0, sizeof(text));
freopen("crue.in","r",stdin);
freopen("crue.out","w",stdout);
ios::sync_with_stdio(false);
long long n;
int m;
cin>>n>>m;
for (int i=0;i<m;i++){
mul();
}
bool temp=false;
for(int i=0,j=0;i<150000;j++)
{
if (text[i]!=0) temp=true;
if (!temp) continue;
cout<<text[i];
if((i+1)%70==0) cout<<endl;
i++;
}
return 0;
}