#include<bits/stdc++.h>
using namespace std;
long long int a=1,b=1,res=1,x=1,y=1,n,o,c;
int main()
{
cin>>o;
for (x;x<=o;x++)
{
for(y;y<=o;y++)
{
for(int i=1;i<=b;i++)res*=a;
cout<<a<<"^"<<b<<"="<<res<<" ";
b++;
}
if(a==b)cout<<"\n";
a++;
}
return 0;
}