#include<iostream>
 using namespace std;
 int main()
 {
 	cout<<"a     a^2   a^3\n";
 	cout<<"1     1     1\n";
 	cout<<"2     4     8\n";
 	cout<<"3     9     27\n";
 	cout<<"4     16    64"<<endl;
 	
 	return 0;
 }