#include <iostream>
using namespace std;

struct Exponential
{
	int basis, exp;
	Exponential(int b = 1, int e = 1): basis{b}, exp{e} {
        if(b==0 && e==0) {
            throw runtime_error("");
        }
        if(b==0 && e>=0) {
            cout << "0^1" << endl;
        }
        if(b==0 && e<0) {
            cout << "0^-1" << endl;
        }
        if(b==1) {
            cout << "1^0";     
        }
        if(b!=0 && e==0) {
            int ausgabe = 1;
        }
   
    }
};

int main()
{
	Exponential(1,1);
}