import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.OutputStreamWriter;
//....................................
public class scorify {
    //Functions : ........................................................................

    //Your COde here : ................................................................................
    public static void main(String[] args) throws IOException{
        OutputStream out = new BufferedOutputStream ( System.out );
        //PrintWriter printWriter = new PrintWriter (System.out);
        //BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        //StringTokenizer st = new StringTokenizer(sc.readLine());
        //BigInteger  a = new  BigInteger (sc.next());
        //BigInteger  b = new BigInteger (sc.next());
        //int res = a.compareTo(b);
        double a = Double.parseDouble(sc.readLine());
        double b = Double.parseDouble(sc.readLine());
        if(a<b)  out.write(("<").getBytes());
        else if(a>b)  out.write((">").getBytes());
        else out.write(("=").getBytes());

    //...................................................................................
        //printWriter.close ();
        out.flush();
        //log.flush();
        //sc.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.math.BigInteger;
//....................................
public class scorify {
    //................................................................................
    public static void main(String[] args) throws IOException{
        OutputStream out = new BufferedOutputStream ( System.out );
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        //StringTokenizer st = new StringTokenizer(sc.readLine());
        BigInteger  a = new  BigInteger (sc.readLine());
        BigInteger  b = new BigInteger (sc.readLine());
        int res = a.compareTo(b);
        if(res==-1)  out.write(("<").getBytes());
        else if(res==1)  out.write((">").getBytes());
        else out.write(("=").getBytes());
    //...................................................................................
        out.flush();
        sc.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.io.PrintWriter;
//....................................
public class scorify {
    //................................................................................
    public static void main(String[] args) throws IOException{
        //OutputStream out = new BufferedOutputStream ( System.out );
        PrintWriter printWriter = new PrintWriter (System.out);
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        //StringTokenizer st = new StringTokenizer(sc.readLine());
        BigInteger  a = new  BigInteger (sc.readLine());
        BigInteger  b = new BigInteger (sc.readLine());
        int res = a.compareTo(b);
        if(res==-1)  printWriter.println ("<");
        else if(res==1)  printWriter.println (">");
        else printWriter.println ("=");

    //...................................................................................
        printWriter.close ();
        //out.flush();
        sc.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.OutputStreamWriter;
//....................................
public class scorify {
    //Functions : ........................................................................

    //Your COde here : ................................................................................
    public static void main(String[] args) throws IOException{
        OutputStream out = new BufferedOutputStream ( System.out );
        //PrintWriter printWriter = new PrintWriter (System.out);
        //BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        //StringTokenizer st = new StringTokenizer(sc.readLine());
        /*
        BigInteger  a = new  BigInteger (sc.readLine());
        BigInteger  b = new BigInteger (sc.readLine());
        int res = a.compareTo(b);
        if(res==-1)  out.write(("<").getBytes());
        else if(res==1)  out.write((">").getBytes());
        else out.write(("=").getBytes());
        */

            String a = sc.readLine().replaceFirst("^0*","");
		    String b = sc.readLine().replaceFirst("^0*","");

			if(a.length() > b.length()){
				out.write((">").getBytes());
			}
			else if(a.length() < b.length()){
				out.write(("<").getBytes());
			}
			else {
				//int res = a.compareTo(b);
				int res = 0;
				//out.write((">").getBytes());
				for(int p=0 ; p<a.length() ; p++){
				    if(a.charAt(p) != b.charAt(p)){
				        res = Character.valueOf(a.charAt(p)) - Character.valueOf(b.charAt(p));
				        break;
				    }
				}
				if(res<0)  out.write(("<").getBytes());
                else if(res>0)  out.write((">").getBytes());
                else out.write(("=").getBytes());
            }
    //...................................................................................
        //printWriter.close ();
        out.flush();
        //log.flush();
        sc.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.OutputStreamWriter;
//....................................
public class scorify {
    //Functions : ........................................................................

    //Your COde here : ................................................................................
    public static void main(String[] args) throws IOException{
        OutputStream out = new BufferedOutputStream ( System.out );
        //PrintWriter printWriter = new PrintWriter (System.out);
        //BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        //StringTokenizer st = new StringTokenizer(sc.readLine());
        /*
        BigInteger  a = new  BigInteger (sc.readLine());
        BigInteger  b = new BigInteger (sc.readLine());
        int res = a.compareTo(b);
        if(res==-1)  out.write(("<").getBytes());
        else if(res==1)  out.write((">").getBytes());
        else out.write(("=").getBytes());
        */

        String a = sc.readLine().replaceFirst("^0*","");
		String b = sc.readLine().replaceFirst("^0*","");

			if(a.length() > b.length()){
				out.write((">").getBytes());
			}
			else if(a.length() < b.length()){
				out.write(("<").getBytes());
			}
			else {
				int res = a.compareTo(b);
				//out.write((">").getBytes());
				if(res<0)  out.write(("<").getBytes());
                else if(res>0)  out.write((">").getBytes());
                else out.write(("=").getBytes());
            }
    //...................................................................................
        //printWriter.close ();
        out.flush();
        //log.flush();
        sc.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedOutputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.InputStream;
import java.io.OutputStreamWriter;
//....................................
public class scorify {
    //Functions : ........................................................................

    //Your COde here : ................................................................................
    public static void main(String[] args) throws IOException{
        OutputStream out = new BufferedOutputStream ( System.out );
        //PrintWriter printWriter = new PrintWriter (System.out);
        //BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        //StringTokenizer st = new StringTokenizer(sc.readLine());
        /*
        BigInteger  a = new  BigInteger (sc.readLine());
        BigInteger  b = new BigInteger (sc.readLine());
        int res = a.compareTo(b);
        if(res==-1)  out.write(("<").getBytes());
        else if(res==1)  out.write((">").getBytes());
        else out.write(("=").getBytes());
        */

            String a = sc.readLine().replaceFirst("^0*","");
		    String b = sc.readLine().replaceFirst("(.*)0","");

			if(a.length() > b.length()){
				out.write((">").getBytes());
			}
			else if(a.length() < b.length()){
				out.write(("<").getBytes());
			}
			else {
				//int res = a.compareTo(b);
				int res = 0;
				//out.write((">").getBytes());
				for(int p=0 ; p<a.length() ; p++){
				    if(a.charAt(p) != b.charAt(p)){
				        res = Character.valueOf(a.charAt(p)) - Character.valueOf(b.charAt(p));
				        break;
				    }
				}
				if(res<0)  out.write(("<").getBytes());
                else if(res>0)  out.write((">").getBytes());
                else out.write(("=").getBytes());
            }
    //...................................................................................
        //printWriter.close ();
        out.flush();
        //log.flush();
        sc.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class CF
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String num1 = br.readLine();
        String num2 = br.readLine();

        num1 = num1.replaceFirst("\\b0+(?=[1-9]|0\\b)", "");
        num2 = num2.replaceFirst("\\b0+(?=[1-9]|0\\b)", "");
        if (num1.length() < num2.length())
        {
            System.out.println("<");
            return;
        }
        else if (num1.length() > num2.length())
        {
            System.out.println(">");
            return;
        }

        for (int i = 0; i < num1.length(); i++)
        {
            if (num1.charAt(i) != num2.charAt(i))
            {
                System.out.println(num1.charAt(i) > num2.charAt(i) ? ">" : "<");
                return;
            }
        }
        System.out.println("=");
        br.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class CF
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String num1 = br.readLine();
        String num2 = br.readLine();

        num1 = num1.replaceFirst("0+(?=[1-9]|0\\b)", "");
        num2 = num2.replaceFirst("0+(?=[1-9]|0\\b)", "");
        if (num1.length() < num2.length())
        {
            System.out.println("<");
            return;
        }
        else if (num1.length() > num2.length())
        {
            System.out.println(">");
            return;
        }

        for (int i = 0; i < num1.length(); i++)
        {
            if (num1.charAt(i) != num2.charAt(i))
            {
                System.out.println(num1.charAt(i) > num2.charAt(i) ? ">" : "<");
                return;
            }
        }
        System.out.println("=");
        br.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class A
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String num1 = br.readLine();
        String num2 = br.readLine();

        while (num1.startsWith("0") && num1.length() > 1)
            num1 = num1.substring(1);
        while (num2.startsWith("0") && num2.length() > 1)
            num2 = num2.substring(1);

        if (num1.length() < num2.length())
        {
            System.out.println("<");
            return;
        }
        else if (num1.length() > num2.length())
        {
            System.out.println(">");
            return;
        }

        for (int i = 0; i < num1.length(); i++)
        {
            if (Character.getNumericValue(num1.charAt(i)) < Character.getNumericValue(num2.charAt(i)))
            {
                System.out.println("<");
                return;
            }
            else if (Character.getNumericValue(num1.charAt(i)) > Character.getNumericValue(num2.charAt(i)))
            {
                System.out.println(">");
                return;
            }
        }

        System.out.println("=");

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class A
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String num1 = br.readLine();
        String num2 = br.readLine();

        num1 = removeZeros(num1);
        num2 = removeZeros(num2);

        if (num1.length() < num2.length())
        {
            System.out.println("<");
            return;
        }
        else if (num1.length() > num2.length())
        {
            System.out.println(">");
            return;
        }

        for (int i = 0; i < num1.length(); i++)
        {
            if (Character.getNumericValue(num1.charAt(i)) < Character.getNumericValue(num2.charAt(i)))
            {
                System.out.println("<");
                return;
            }
            else if (Character.getNumericValue(num1.charAt(i)) > Character.getNumericValue(num2.charAt(i)))
            {
                System.out.println(">");
                return;
            }
        }

        System.out.println("=");

    }
    private static String removeZeros(String original)
    {
        for (int i = 0; i < original.length(); i++)
        {
            if (original.charAt(i) != '0')
                return original.substring(i);
        }
        return "0";
    }
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		int x = Integer.parseInt(bf.readLine());
		int y = Integer.parseInt(bf.readLine());
		String result;
		if (x > y)
			result = ">";
		else if (y > x)
			result = "<";
		else
			result = "=";
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String a = bf.readLine().trim();
		String b = bf.readLine().trim();
		long x = Long.parseLong(a.length() <= 20? a: a.substring(0,19));
		long y = Long.parseLong(b.length() <= 20? b: b.substring(0,19));
		String result;
		if (x > y)
			result = ">";
		else if (y > x)
			result = "<";
		else
			result = "=";
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		long x = Long.parseLong(bf.readLine().trim());
		long y = Long.parseLong(bf.readLine().trim());
		String result;
		if (x > y)
			result = ">";
		else if (y > x)
			result = "<";
		else
			result = "=";
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException, NumberFormatException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String x = bf.readLine();
		String y = bf.readLine();
		int c = 0;
		for (int i = 0; i < x.length(); i++) {
			if (x.charAt(i) == '0')
				c++;
			else
				break;
		}
		x = x.substring(c);
		c = 0;
		for (int i = 0; i < y.length(); i++) {
			if (y.charAt(i) == '0')
				c++;
			else
				break;
		}
		y = y.substring(c);
		String result = "=";
		if (x.length() > y.length())
			result = ">";
		else if (x.length() < y.length())
			result = "<";
		else {
			for (int i = 0; i < x.length(); i++) {
				if (Integer.parseInt(""+x.charAt(i)) > Integer.parseInt(""+y.charAt(i))) {
					result = ">";
					break;
				}
				else if (Integer.parseInt(""+x.charAt(i)) < Integer.parseInt(""+y.charAt(i))) {
					result = "<";
					break;
				}
			}
		}
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
import java.math.BigInteger;

public class CF_616A {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		BigInteger x = new BigInteger(bf.readLine().trim());
		BigInteger y = new BigInteger(bf.readLine().trim());
		String result;
		if (x.compareTo(y) > 0)
			result = ">";
		else if (x.compareTo(y) < 0)
			result = "<";
		else
			result = "=";
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		long x = Long.parseLong(bf.readLine());
		long y = Long.parseLong(bf.readLine());
		String result;
		if (x > y)
			result = ">";
		else if (y > x)
			result = "<";
		else
			result = "=";
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String a = bf.readLine().trim();
		String b = bf.readLine().trim();
		long x = Long.parseLong(a.length() <= 19? a: a.substring(0,18));
		long y = Long.parseLong(b.length() <= 19? b: b.substring(0,18));
		String result;
		if (x > y)
			result = ">";
		else if (y > x)
			result = "<";
		else
			result = "=";
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class CF_616A {
	public static void main(String[] args) throws IOException, NumberFormatException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String x = bf.readLine();
		String y = bf.readLine();
		int c = 0;
		for (int i = 0; i < x.length(); i++) {
			if (x.charAt(0) == 0)
				c++;
			else
				break;
		}
		x = x.substring(c);
		c = 0;
		for (int i = 0; i < y.length(); i++) {
			if (y.charAt(0) == 0)
				c++;
			else
				break;
		}
		y = y.substring(c);
		String result = "=";
		if (x.length() > y.length())
			result = ">";
		else if (x.length() < y.length())
			result = "<";
		else {
			for (int i = 0; i < x.length(); i++) {
				if (Integer.parseInt(""+x.charAt(i)) > Integer.parseInt(""+y.charAt(i))) {
					result = ">";
					break;
				}
				else if (Integer.parseInt(""+x.charAt(i)) < Integer.parseInt(""+y.charAt(i))) {
					result = "<";
					break;
				}
			}
		}
		PrintWriter out = new PrintWriter(System.out);
		out.println(result);
		out.flush();
	}
}


import java.io.*;
public class Long {

    public static void main(String[]args) throws IOException
    {	PrintWriter pw =new PrintWriter (new OutputStreamWriter(System.out));
    	BufferedReader bf =new BufferedReader(new InputStreamReader(System.in));
    	String x=bf.readLine();
    	String y=bf.readLine();
    	int f=0;
    	for(int i=0;x.length()!=0 && x.charAt(i)=='0';)
    			x=x.substring(1);
    	for(int i=0;y.length()!=0 && y.charAt(i)=='0';)
    			y=y.substring(1);
    	if (x.length()>y.length())
    		pw.print(">");
    	else if (x.length()<y.length())
    		pw.print("<");
    	else
    	{
    		for(int i=0; i<x.length() && f==0;i++)
    		{
    			if (x.charAt(i)>y.charAt(i))
    			{pw.print(">");
    				f=1;}
    			else if	(x.charAt(i)<y.charAt(i))
    			{
    				pw.print("<");
    				f=1;
    			}
    		}
    		if(f==0)
    		pw.print("=");
    		pw.close();
    	}
    }

}


import java.util.Scanner;

/**
 *
 * @author Created by harrisonsuh
 *
 */

public class LongInteger {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String a = in.next();
		String b = in.next();
		//remove any leading zeroes from first int
		for (int i = 0; i < a.length(); i++) {
			if (Integer.parseInt(a.substring(i, i+1)) != 0 || i+1 == a.length()) {
				a = a.substring(i);
				break;
			}
		}
		//remove any leading zeroes for second int
		for (int i = 0; i < b.length(); i++) {
			if (Integer.parseInt(b.substring(i, i+1)) != 0 || i+1 == b.length()) {
				b = b.substring(i);
				break;
			}
		}
		//compare lengths of the two integers
		if (a.length() < b.length()) {
			System.out.println('<');
		} else if (a.length() > b.length()) {
			System.out.println('>');
		//if they are the same length, iterate through each digit and find first point of difference
		} else if (a.length() == b.length()) {
			for (int i = 0; i < a.length(); i++) {
				if (a.charAt(i) > b.charAt(i)) {
					System.out.println('>');
					return;
				}
				if (a.charAt(i) < b.charAt(i)) {
					System.out.println('<');
					return;
				}
			}
		//if all tests pass (all digits are equal), return they are equal.
		System.out.println('=');
		return;
		}
	}
}


import java.io.*;
public class Long {

    public static void main(String[]args) throws IOException
    {	PrintWriter pw =new PrintWriter (new OutputStreamWriter(System.out));
    	BufferedReader bf =new BufferedReader(new InputStreamReader(System.in));
    	String x=bf.readLine();
    	String y=bf.readLine();
    	int f=0;
    	for(int i=0;x.length()!=0 && x.charAt(i)=='0';)
    			x=x.substring(1);
    	for(int i=0;y.length()!=0 && y.charAt(i)=='0';)
    			y=y.substring(1);
    	if (x.length()>y.length())
    		pw.print(">");
    	else if (x.length()<y.length())
    		pw.print("<");
    	else
    	{
    		for(int i=0; i<x.length() && f==0;i++)
    		{
    			if (x.charAt(i)>y.charAt(i))
    			{pw.print(">");
    				f=1;}
    			else if	(x.charAt(i)<y.charAt(i))
    			{
    				pw.print("<");
    				f=1;
    			}
    		}
    		if(f==0)
    		pw.print("=");

    	}pw.close();
    }

}


import java.io.*;
public class Long {

    public static void main(String[]args) throws IOException
    {
    	BufferedReader bf =new BufferedReader(new InputStreamReader(System.in));
    	String x=bf.readLine();
    	String y=bf.readLine();
    	int f=0;
    	for(int i=0;x.length()!=0 && x.charAt(i)=='0';)
    			x=x.substring(1);
    	for(int i=0;y.length()!=0 && y.charAt(i)=='0';)
    			y=y.substring(1);
    	if (x.length()>y.length())
    		System.out.print(">");
    	else if (x.length()<y.length())
    		System.out.print("<");
    	else
    	{
    		for(int i=0; i<x.length() && f==0;i++)
    		{
    			if (x.charAt(i)>y.charAt(i))
    			{System.out.print(">");
    				f=1;}
    			else if	(x.charAt(i)<y.charAt(i))
    			{
    				System.out.print("<");
    				f=1;
    			}
    		}
    		if(f==0)
    		System.out.print("=");
    	}
    }

}


import java.util.*;
public class LongInteger {

    public static void main(String[]args)
    {
    	Scanner sc=new Scanner (System.in);
    	int x=sc.nextInt();
    	int y=sc.nextInt();
    	if (x>y)
    		System.out.print(">");
    	else if(y>x)
    		System.out.print("<");
    	else
    		System.out.print("=");
    }

}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1)
        			x=x.substring(1);
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1)
        			y=y.substring(1);
        		else{
        			leny=y.length();
        			break;
        		}
        	}
        }
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}

	}

}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;

public class largernigint {

    public largernigint() {
    }

    public static void main(String[] args) throws java.io.IOException {

        InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	PrintWriter out = new PrintWriter(System.out);

        String first= bf.readLine();
        String second=bf.readLine();
        BigInteger big1=new BigInteger(first);
		BigInteger big2=new BigInteger(second);

		int lenfirst= first.length();
    	int lensecond=second.length();

		if(first.charAt(0)!=48){
		if(first.length()>second.length()){
			out.println('>');
    		out.flush();
		}
    		else
    			if(second.length()>first.length()){
    				out.println('<');
    				out.flush();
    			}
    			else
					if(big1.compareTo(big2)==1){
						out.println('>');
    					out.flush();
					}
    				else
    					if(big1.compareTo(big2)==-1){
    						out.println('<');
    						out.flush();
    					}
    					else{
    						out.println('=');
    						out.flush();
    					}
		}
		else{
			if(big1.compareTo(big2)==1){
						out.println('>');
    					out.flush();
					}
    				else
    					if(big1.compareTo(big2)==-1){
    						out.println('<');
    						out.flush();
    					}
    					else{
    						out.println('=');
    						out.flush();
    					}
		}

    }
}
/**for(int i=0;i<lenfirst;i++)
    			if(first.charAt(0)==48 && first.length()>1)
    				first=first.substring(1);
    		for(int i=0;i<lensecond;i++)
    			if(second.charAt(0)==48 && second.length()>1)
    				second=second.substring(1);
    		**/


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				if(x.charAt(x.length()-1)=='0'){
        					x="0";
        					lenx=1;
        					break;
        				}
        				else{
        					x=x.charAt(x.length()-1)+"";
        						lenx=1;
        						break;
        				}
        			}
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					long yy=Long.parseLong(y);
        					System.out.println(yy);
        					y="";
        					y=y+yy;
        					leny=1;
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.util.*;
import java.io.*;
public class larger {

    public larger() {
    }

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	int lenx= xx.length();
    	int leny=yy.length();

    	for(int i=0;i<lenx;i++)
    		if(xx.charAt(0)==48 && xx.length()>1)
    			xx=xx.substring(1);
    	for(int i=0;i<leny;i++)
    		if(yy.charAt(0)=='0' && yy.length()>1)
    			yy=yy.substring(1);
    	if(xx.length()>yy.length())
    		System.out.println('>');
    		else
    			if(yy.length()>xx.length())
    				System.out.println('<');
    				else
    					if(xx.charAt(0)>yy.charAt(0))
    						System.out.println('>');
    						else
    							if(xx.charAt(0)<yy.charAt(0))
    								System.out.println('<');
    								else{
    									String bigger="";
    									for(int i=0;i<xx.length();i++){
    										if(xx.charAt(i)>yy.charAt(i)){
    											bigger=xx;
    											break;
    										}
    										else
    											if(xx.charAt(i)<yy.charAt(i)){
    												bigger=yy;
    												break;
    											}
    											else
    												bigger=null;
    									}
    									if(bigger==xx)
    										System.out.println('>');
    									else
    										if(bigger==yy)
    											System.out.println('<');
    											else
    												System.out.println('=');
    								}
    }
}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				if(x.charAt(x.length()-1)=='0'){
        					x="0";
        					lenx=1;
        					break;
        				}
        				else{
        					x=x.charAt(x.length()-1)+"";
        						lenx=1;
        						break;
        				}
        			}
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>50){
        				if(y.charAt(x.length()-1)=='0'){
        					y="0";
        					leny=1;
        					break;
        				}
        				else{
        					y=y.charAt(y.length()-1)+"";
        						leny=1;
        						break;
        				}
        			}
        		else{
        			leny=y.length();
        			break;
        		}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}

	}

}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				long xx=Long.parseLong(x);
        				//System.out.println(yy);
        				x="";
        				x=x+xx;
        				lenx=1;
        				break;
        			}
        			else{
        				lenx=x.length();
        				break;
        			}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					long yy=Long.parseLong(y);
        					//System.out.println(yy);
        					y="";
        					y=y+yy;
        					leny=1;
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.util.*;
import java.io.*;
public class larger {

    public larger() {
    }

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	for(int i=0;i<xx.length();i++){
    		if(xx.charAt(i)==48)
    			xx=xx.substring(1);
    	}
    	for(int i =0;i<yy.length();i++){
    		if(yy.charAt(i)=='0')
    			yy.substring(1);
    	}
        int x=Integer.parseInt(xx);
        int y=Integer.parseInt(yy);
        if(x>y)
        	System.out.println('>');
        	else
        		if(y>x)
        			System.out.println('<');
        			else
        				System.out.println('=');

    }
}


import java.io.*;
public class larger {

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	PrintWriter out = new PrintWriter(System.out);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	int lenx= xx.length();
    	int leny=yy.length();

    	for(int i=0;i<lenx;i++)
    		if(xx.charAt(0)==48 && xx.length()>1 && xx.length()<60)
    			xx=xx.substring(1);
    	for(int i=0;i<leny;i++)
    		if(yy.charAt(0)==48 && yy.length()>1 && xx.length()<60)
    			yy=yy.substring(1);

    	if(xx.length()>yy.length()){
    		out.println('>');
    		out.flush();
    	}
    		else
    			if(yy.length()>xx.length()){

    				out.println('<');
    				out.flush();
    			}
    				else
    					if(xx.charAt(0)>yy.charAt(0)){

    						out.println('>');
    						out.flush();
    					}
    						else
    							if(xx.charAt(0)<yy.charAt(0)){

    								out.println('<');
    								out.flush();
    							}
    								else{
    									String bigger="";
    									for(int i=0;i<xx.length();i++){
    										if(xx.charAt(i)>yy.charAt(i)){
    											bigger=xx;
    											break;
    										}
    										else
    											if(xx.charAt(i)<yy.charAt(i)){
    												bigger=yy;
    												break;
    											}
    											else
    												bigger=null;
    									}
    									if(bigger==xx){

    										out.println('>');
    										out.flush();
    									}
    									else
    										if(bigger==yy){

    											out.println('<');
    											out.flush();
    										}
    											else{

    												out.println('=');
    												out.flush();
    											}
    								}
    }
}


import java.io.*;
import java.math.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();
        //if(x.length()==0)
        //	x=x+"0";
        //if(y.length()==0)
        //	y=y+"0";

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				BigInteger bigx = new BigInteger(x);
        				//BigInteger xx=Long.parseLong(x);
        				//System.out.println(yy);
        				x="";
        				x=x+bigx;
        				lenx=1;
        				break;
        			}
        			else{
        				lenx=x.length();
        				break;
        			}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					BigInteger bigy = new BigInteger(y);
        					//long yy=Long.parseLong(y);
        					//System.out.println(yy);
        					y="";
        					y=y+bigy;
        					leny=1;
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.util.*;
import java.io.*;
public class larger {

    public larger() {
    }

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	/**for(int i=0;i<xx.length();i++){
    		if(xx.charAt(i)==48)
    			xx=xx.substring(1);
    	}
    	for(int i =0;i<yy.length();i++){
    		if(yy.charAt(i)=='0')
    			yy.substring(1);
    	}
    	**/
        int x=Integer.parseInt(xx);
        int y=Integer.parseInt(yy);
        if(x>y)
        	System.out.println('>');
        	else
        		if(y>x)
        			System.out.println('<');
        			else
        				System.out.println('=');

    }
}


import java.io.*;
import java.math.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();
        if(x.length()==0)
        	x=x+"0";
        if(y.length()==0)
        	y=y+"0";

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				BigInteger bigx = new BigInteger(x);
        				//BigInteger xx=Long.parseLong(x);
        				//System.out.println(yy);
        				x="";
        				x=x+bigx;
        				lenx=1;
        				break;
        			}
        			else{
        				lenx=x.length();
        				break;
        			}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					BigInteger bigy = new BigInteger(y);
        					//long yy=Long.parseLong(y);
        					//System.out.println(yy);
        					y="";
        					y=y+bigy;
        					leny=1;
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;

public class largernigint {

    public largernigint() {
    }

    public static void main(String[] args) throws java.io.IOException {

        InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	PrintWriter out = new PrintWriter(System.out);

        String first= bf.readLine();
        String second=bf.readLine();
        BigInteger big1=new BigInteger(first);
		BigInteger big2=new BigInteger(second);
		if(big1.compareTo(big2)==1){
			out.println('>');
    		out.flush();
		}
    	else
    		if(big1.compareTo(big2)==-1){
    			out.println('<');
    			out.flush();
    		}
    		else{
    			out.println('=');
    			out.flush();
    		}

    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;

public class largernigint {

    public largernigint() {
    }

    public static void main(String[] args) throws java.io.IOException {

        InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	PrintWriter out = new PrintWriter(System.out);

        String first= bf.readLine();
        String second=bf.readLine();
        BigInteger big1=new BigInteger(first);
		BigInteger big2=new BigInteger(second);

		int lenfirst= first.length();
    	int lensecond=second.length();

		for(int i=0;i<lenfirst;i++)
    		if(first.charAt(0)==48 && first.length()>1)
    			first=first.substring(1);
    	for(int i=0;i<lensecond;i++)
    		if(second.charAt(0)==48 && second.length()>1)
    			second=second.substring(1);

		if(first.length()>second.length()){
			out.println('>');
    		out.flush();
		}
    		else
    			if(second.length()>first.length()){
    				out.println('<');
    				out.flush();
    			}
    			else
					if(big1.compareTo(big2)==1){
						out.println('>');
    					out.flush();
					}
    				else
    					if(big1.compareTo(big2)==-1){
    						out.println('<');
    						out.flush();
    					}
    					else{
    						out.println('=');
    						out.flush();
    					}

    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;
public class testbig {

    public static void main(String[] args)throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);
        int lenf=first.length();
        int lens=second.length();
        if( (lenf>18 || lens>18) && first.charAt(0)!='0' && second.charAt(0)!='0'){
        	if(lenf>lens){
        		out.println('>');
            	out.flush();
        	}
        	else
        		if(lens>lenf){
        			out.println('<');
            		out.flush();
        		}
        		else{
        			boolean flag=true;
        			for(int i=0;i<lenf;i++){
        				if(first.charAt(i)>second.charAt(i)){
        					out.println('>');
            				out.flush();
            				flag=false;
            				break;
        				}
        				else
        					if(first.charAt(i)<second.charAt(i)){
        						out.println('<');
            					out.flush();
            					flag=false;
            					break;
        					}
        			}
        			if(flag==true){
        				out.println('=');
            			out.flush();
        			}

        		}
        }
        else{
        	int x=big1.compareTo(big2);
        	if(x>0){
            	out.println('>');
            	out.flush();
        	}
        	else if(x<0){
            	out.println('<');
            	out.flush();
        	}
        	else{
            	out.println('=');
            	out.flush();
        	}
        }
    }
}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				x="0";
        				lenx=1;
        				break;
        			}
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>50){
        				y="0";
        				leny=1;
        				break;
        			}
        		else{
        			leny=y.length();
        			break;
        		}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}

	}

}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;
public class complargeint {

    public static void main(String[] args)throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);
        int lenf=first.length();
        int lens=second.length();
        if(first.charAt(0)!='0' && second.charAt(0)!='0'){
        	if(lenf>lens){
        		out.println('>');
            	out.flush();
        	}
        	else
        		if(lens>lenf){
        			out.println('<');
            		out.flush();
        		}
        		else{
        			int x=big1.compareTo(big2);
        			if(x>0){
            			out.println('>');
            			out.flush();
        			}
        			else if(x<0){
            			out.println('<');
            			out.flush();
        			}
        			else{
            			out.println('=');
            			out.flush();
        			}
        		}
        }
        else{
        	int x=big1.compareTo(big2);
        	if(x>0){
            	out.println('>');
            	out.flush();
        	}
        	else if(x<0){
            	out.println('<');
            	out.flush();
        	}
        	else{
            	out.println('=');
            	out.flush();
        	}
        }
    }
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>

#define int long long
#define ft first
#define sd second

using namespace std;
using namespace __gnu_pbds;

typedef pair<int, int> pii;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> o_s;

const int MAXH = 100 * 1000;

int h, a[MAXH], c[MAXH];
bool b;
vector<int> p[MAXH], q[MAXH];

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    cin >> h;
    for (int i = 0; i <= h; i++) {
        cin >> a[i];
        c[i] = a[i];
        if (i && a[i] > 1 && a[i - 1] > 1) b = true;
    }
    if (!b) return cout << "perfect\n", 0;
    cout << "ambiguous\n";
    for (int i = 0, j = 1; i <= h; i++)
        while (a[i]--) cout << (i? p[i - 1].back(): 0) << ' ', p[i].push_back(j++);
    cout << '\n';
    for (int i = 0, j = 1; i <= h; i++) {
        bool f = true;
        while (c[i]--) cout << (f? f = false, (i? q[i - 1][0]: 0): (i? p[i - 1].back(): 0)) << ' ', q[i].push_back(j++);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN (int)(2e5 + 5)
#define MAXM (int)(1e2+5)
#define fr first
#define sd second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define M0(a) memset(a, 0, sizeof(a))
#define M1(a) memset(a, -1, sizeof(a))
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPN(i,n,m) for(int i = m; i <= int(n); i++)
#define RREP(i,n) for(int i = int(n-1); i >= 0; i--)
#define RREPN(i, n, m) for(int i = n; i >= (int)m; i--)
typedef long long ll;
typedef double db;
typedef long double ld;
const int INF=1000000007;
const ll MOD = ll(1e9 + 7);
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppii;
template<typename T, typename U> inline void AMIN(T &x, U y){ if(x > y) x = y;}
template<typename T, typename U> inline void AMAX(T &x, U y){ if(x < y) x = y;}
int ht[MAXN], ord[MAXN];

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;

    int ok = 0, x = 0;
    REP(i, n + 1)
        cin >> ht[i], ok |= ht[i] != 1, x += ht[i];

    if(!ok){
        cout << "perfect\n";
        return 0;
    }

    cout << "ambiguous\n";

    int sum = 0;
    REP(i, n + 1){

        REPN(j, sum + ht[i] - 1, sum){
            ord[j] = sum;
            cout << ord[j] << " ";
        }
        sum += ht[i];
    }
    cout << endl;

    sum = 0;
    REP(i, n){

        sum += ht[i];
        if(ht[i] == 1)
            continue;

        ord[sum ]--;
        break;
    }

    REP(i, x)
        cout << ord[i] << " ";
    cout << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN (int)(2e5 + 5)
#define MAXM (int)(1e2+5)
#define fr first
#define sd second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define M0(a) memset(a, 0, sizeof(a))
#define M1(a) memset(a, -1, sizeof(a))
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPN(i,n,m) for(int i = m; i <= int(n); i++)
#define RREP(i,n) for(int i = int(n-1); i >= 0; i--)
#define RREPN(i, n, m) for(int i = n; i >= (int)m; i--)
typedef long long ll;
typedef double db;
typedef long double ld;
const int INF=1000000007;
const ll MOD = ll(1e9 + 7);
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppii;
template<typename T, typename U> inline void AMIN(T &x, U y){ if(x > y) x = y;}
template<typename T, typename U> inline void AMAX(T &x, U y){ if(x < y) x = y;}
int ht[MAXN], ord[MAXN];

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;

    int ok = 0, x = 0;
    REP(i, n + 1)
        cin >> ht[i], ok = ht[i] != 1, x += ht[i];

    if(!ok){
        cout << "perfect\n";
        return 0;
    }

    cout << "ambiguous\n" << x << endl;;

    int sum = 0;
    REP(i, n + 1){

        REPN(j, sum + ht[i] - 1, sum){
            ord[j] = sum;
            cout << ord[j] << " ";
        }
        sum += ht[i];
    }
    cout << endl;

    sum = 0;
    REP(i, n){

        sum += ht[i];
        if(ht[i] == 1)
            continue;

        ord[sum ]--;
        break;
    }

    REP(i, x)
        cout << ord[i] << " ";
    cout << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN (int)(2e5 + 5)
#define MAXM (int)(1e2+5)
#define fr first
#define sd second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define M0(a) memset(a, 0, sizeof(a))
#define M1(a) memset(a, -1, sizeof(a))
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPN(i,n,m) for(int i = m; i <= int(n); i++)
#define RREP(i,n) for(int i = int(n-1); i >= 0; i--)
#define RREPN(i, n, m) for(int i = n; i >= (int)m; i--)
typedef long long ll;
typedef double db;
typedef long double ld;
const int INF=1000000007;
const ll MOD = ll(1e9 + 7);
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppii;
template<typename T, typename U> inline void AMIN(T &x, U y){ if(x > y) x = y;}
template<typename T, typename U> inline void AMAX(T &x, U y){ if(x < y) x = y;}
int ht[MAXN], ord[MAXN];

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;

    int ok = 1, x = 0;
    REP(i, n + 1)
        cin >> ht[i], ok &= ht[i] == 1, x += ht[i];

    if(ok){
        cout << "perfect\n";
        return 0;
    }

    cout << "ambiguous\n";

    int sum = 0;
    REP(i, n + 1){

        REPN(j, sum + ht[i] - 1, sum){
            ord[j] = sum;
            cout << ord[j] << " ";
        }
        sum += ht[i];
    }
    cout << endl;

    sum = 0;
    REP(i, n){

        sum += ht[i];
        if(ht[i] == 1)
            continue;

        ord[sum ]--;
        break;
    }

    REP(i, x)
        cout << ord[i] << " ";
    cout << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN (int)(2e5 + 5)
#define MAXM (int)(1e2+5)
#define fr first
#define sd second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define M0(a) memset(a, 0, sizeof(a))
#define M1(a) memset(a, -1, sizeof(a))
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPN(i,n,m) for(int i = m; i <= int(n); i++)
#define RREP(i,n) for(int i = int(n-1); i >= 0; i--)
#define RREPN(i, n, m) for(int i = n; i >= (int)m; i--)
typedef long long ll;
typedef double db;
typedef long double ld;
const int INF=1000000007;
const ll MOD = ll(1e9 + 7);
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppii;
template<typename T, typename U> inline void AMIN(T &x, U y){ if(x > y) x = y;}
template<typename T, typename U> inline void AMAX(T &x, U y){ if(x < y) x = y;}
int ht[MAXN], ord[MAXN];

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;

    int ok = 1, x = 0;
    REP(i, n + 1)
        cin >> ht[i], x += ht[i];

    REP(i, n){
        if(ht[i] != 1 && ht[i + 1] != 1){
            ok = 0;
            break;
        }
    }

    if(ok){
        cout << "perfect\n";
        return 0;
    }

    cout << "ambiguous\n";

    int sum = 0;
    REP(i, n + 1){

        REPN(j, sum + ht[i] - 1, sum){
            ord[j] = sum;
            cout << ord[j] << " ";
        }
        sum += ht[i];
    }
    cout << endl;

    sum = 0;
    REP(i, n){

        sum += ht[i];
        if(ht[i] == 1 || ht[i + 1] == 1)
            continue;

        ord[sum ]--;
        break;
    }

    REP(i, x)
        cout << ord[i] << " ";
    cout << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN (int)(2e5 + 5)
#define MAXM (int)(1e2+5)
#define fr first
#define sd second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define M0(a) memset(a, 0, sizeof(a))
#define M1(a) memset(a, -1, sizeof(a))
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPN(i,n,m) for(int i = m; i <= int(n); i++)
#define RREP(i,n) for(int i = int(n-1); i >= 0; i--)
#define RREPN(i, n, m) for(int i = n; i >= (int)m; i--)
typedef long long ll;
typedef double db;
typedef long double ld;
const int INF=1000000007;
const ll MOD = ll(1e9 + 7);
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppii;
template<typename T, typename U> inline void AMIN(T &x, U y){ if(x > y) x = y;}
template<typename T, typename U> inline void AMAX(T &x, U y){ if(x < y) x = y;}
int ht[MAXN], ord[MAXN];

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;

    int ok = 1, x = 0;
    REP(i, n + 1)
        cin >> ht[i], ok &= ht[i] == 1, x += ht[i];

    if(!ok){
        cout << "perfect\n";
        return 0;
    }

    cout << "ambiguous\n";

    int sum = 0;
    REP(i, n + 1){

        REPN(j, sum + ht[i] - 1, sum){
            ord[j] = sum;
            cout << ord[j] << " ";
        }
        sum += ht[i];
    }
    cout << endl;

    sum = 0;
    REP(i, n){

        sum += ht[i];
        if(ht[i] == 1)
            continue;

        ord[sum ]--;
        break;
    }

    REP(i, x)
        cout << ord[i] << " ";
    cout << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define MAXN (int)(2e5 + 5)
#define MAXM (int)(1e2+5)
#define fr first
#define sd second
#define mp make_pair
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define M0(a) memset(a, 0, sizeof(a))
#define M1(a) memset(a, -1, sizeof(a))
#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REPN(i,n,m) for(int i = m; i <= int(n); i++)
#define RREP(i,n) for(int i = int(n-1); i >= 0; i--)
#define RREPN(i, n, m) for(int i = n; i >= (int)m; i--)
typedef long long ll;
typedef double db;
typedef long double ld;
const int INF=1000000007;
const ll MOD = ll(1e9 + 7);
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<pii, pii> ppii;
template<typename T, typename U> inline void AMIN(T &x, U y){ if(x > y) x = y;}
template<typename T, typename U> inline void AMAX(T &x, U y){ if(x < y) x = y;}
int ht[MAXN], ord[MAXN];

int main(){
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;

    int ok = 0, x = 0;
    REP(i, n + 1)
        cin >> ht[i], ok = ht[i] != 1, x += ht[i];

    if(!ok){
        cout << "perfect\n";
        return 0;
    }

    cout << "ambiguous\n" << endl;;

    int sum = 0;
    REP(i, n + 1){

        REPN(j, sum + ht[i] - 1, sum){
            ord[j] = sum;
            cout << ord[j] << " ";
        }
        sum += ht[i];
    }
    cout << endl;

    sum = 0;
    REP(i, n){

        sum += ht[i];
        if(ht[i] == 1)
            continue;

        ord[sum ]--;
        break;
    }

    REP(i, x)
        cout << ord[i] << " ";
    cout << endl;
}


/*
"An anomaly, I'm Muhammad Ali
  Cause I know one day I'm gonna be the"
                - Greatest, Eminem
*/
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
#define ff first
#define Shazam ios_base::sync_with_stdio(false);   cin.tie(NULL); cout.tie(NULL);
#define ss second
#define all(c) c.begin(),c.end()
#define endl "\n"
#define test() int t; cin>>t; while(t--)
#define fl(i,a,b) for(int i = a ; i <b ;i++)
#define get(a) fl(i,0,a.size())  cin>>a[i];
#define pra(a) fl(i,0,a.size()) cout<<a[i]<<" ";	cout<<endl;
#define pr(a,n) fl(i,0,n) cout<<a[i]<<" ";	cout<<endl;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
const ll INF = 2e18;
const int inf = 2e9;
const int mod1 = 1e9 + 7;

int main(){
    Shazam;
    int h; cin >> h;
    vector<int> a(h+1);
    get(a);
    int bad = -1;
    for(int i = 0; i < h; i++){
        if(a[i] > 1 && a[i+1] > 1)
            bad = i;
    }

    if(bad != -1){
        cout << "ambiguous" << endl;
        int cnt = 0;
        for(int i = 0; i < h + 1; i++){
            for(int j = 0; j < a[i] ; j++){
                cout << cnt << " ";
            }
            cnt += a[i];
        }
        cout << endl;
        bool relocated = false;
        cnt = 0;
        for(int i = 0; i < h + 1; i++){
            if( i == bad + 1){
                for(int j = 0; j < a[i]; j++){
                    if(relocated) cout << cnt << " ";
                    else{
                        cout << cnt - 1 << " ";
                        relocated = true;
                    }
                }
            }
            else{
                for(int j = 0; j < a[i]; j++){
                    cout << cnt << " ";
                }
            }
            cnt += a[i];
        }
    }
    else{
        cout << "perfect" << endl;
    }
    return 0;
}


      #include <bits/stdc++.h>
      #include <ext/pb_ds/assoc_container.hpp>
      #include <ext/pb_ds/tree_policy.hpp>
      using namespace __gnu_pbds;
      using namespace std;
      #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
      #define ll            long long
      #define pb            push_back
      #define ppb           pop_back
      #define si            set <ll>
      #define endl          '\n'
      #define fr            first
      #define sc            second
      #define mii           map<ll,ll>
      #define msi           map<string,ll>
      #define mis           map<ll,string>
      #define rep(i,a,b)    for(ll  i=a;i<b;i++)
      #define all(v)        v.begin(),v.end()
      #define pii           pair<ll,ll>
      #define vi            vector<ll>
      #define vii           vector<pair<ll,ll>>
      #define vs            vector<string>
      #define sz(x)         (ll)x.size()
      #define rt            return
      #define M             1000000007
      #define bs            binary_search
      #define rev(a)        reverse(all(a));
      #define sp(n)         setprecision(n)
      #define spl           " "
      #define rt            return
      #define arr(a,n)      rep(i,0,n) cin>>a[i]
      #define mod           998244353
      #define time          cout << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
      #define INF           1ll<<31
      void __print(int x) {cerr << x;}
      void __print(long x) {cerr << x;}
      void __print(long long x) {cerr << x;}
      void __print(unsigned x) {cerr << x;}
      void __print(unsigned long x) {cerr << x;}
      void __print(unsigned long long x) {cerr << x;}
      void __print(float x) {cerr << x;}
      void __print(double x) {cerr << x;}
      void __print(long double x) {cerr << x;}
      void __print(char x) {cerr << '\'' << x << '\'';}
      void __print(const char *x) {cerr << '\"' << x << '\"';}
      void __print(const string &x) {cerr << '\"' << x << '\"';}
      void __print(bool x) {cerr << (x ? "true" : "false");}
      template<typename T, typename V>
      void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
      template<typename T>
      void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
      void _print() {cerr << "]\n";}
      template <typename T, typename... V>
      void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
      #ifndef ONLINE_JUDGE
      #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
      #else
      #define debug(x...)
      #endif
      ll power(ll x, unsigned ll y, ll p)
      {
          ll res = 1;     // Initialize result
          x = x % p;       // Update x if it is more than or
                           // equal to p
          if (x == 0) return 0; // In case x is divisible by p;
          while (y > 0)
          {
              // If y is odd, multiply x with result
              if (y & 1)
                  res = (res*x) % p;

              // y must be even now
              y = y>>1; // y = y/2
              x = (x*x) % p;
          }
          return res;
      }
      ll modInverse(ll A,ll mm)
      {
          return power(A,mm-2,mm);
      }
      ll nCrModPFermat(ll n, ll r, ll p)
      {
         if (r==0)
            return 1;
          ll fac[n+1];
          fac[0] = 1;
          for (ll i=1 ; i<=n; i++)
              fac[i] = fac[i-1]*i%p;

          return (fac[n]*modInverse(fac[r],p)%p*modInverse(fac[n-r], p)%p)%p;
      }
      const ll N=3e5+500;
      ll ans[N]={0};
      void solve()
      {
        ll h;
        cin>>h;
        ll a[h+1];
        rep(i,0,h+1) cin>>a[i];
        if(h==1) {cout<<"perfect";rt;}
        bool f=1;
        rep(i,0,h+1) if(a[i]!=1) f=0;
        if(f) {cout<<"perfect";rt;}
        ans[1]=0;
        ll t=1,j=2;
        for(ll c=1;c<=h;c++)
        {
          rep(i,0,a[c])
          ans[j++]=t;
          t=j-1;
        }
        cout<<"ambiguous"<<endl;
        rep(i,1,j) cout<<ans[i]<<" ";cout<<endl;
        for(ll i=1;i<=j-2;i++)
        {
          if(ans[i]==ans[i+1] && ans[i+1]!=ans[i+2])
          {
            ans[i+2]=i;
            break;
          }
        }
        rep(i,1,j) cout<<ans[i]<<" ";

      }
      signed main()
      {
          ios_base::sync_with_stdio(false);
          cin.tie(0);
          ll t=1;
          //cin>>t;
          while(t--) solve();
      }


      #include <bits/stdc++.h>
      #include <ext/pb_ds/assoc_container.hpp>
      #include <ext/pb_ds/tree_policy.hpp>
      using namespace __gnu_pbds;
      using namespace std;
      #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
      #define ll            long long
      #define pb            push_back
      #define ppb           pop_back
      #define si            set <ll>
      #define endl          '\n'
      #define fr            first
      #define sc            second
      #define mii           map<ll,ll>
      #define msi           map<string,ll>
      #define mis           map<ll,string>
      #define rep(i,a,b)    for(ll  i=a;i<b;i++)
      #define all(v)        v.begin(),v.end()
      #define pii           pair<ll,ll>
      #define vi            vector<ll>
      #define vii           vector<pair<ll,ll>>
      #define vs            vector<string>
      #define sz(x)         (ll)x.size()
      #define rt            return
      #define M             1000000007
      #define bs            binary_search
      #define rev(a)        reverse(all(a));
      #define sp(n)         setprecision(n)
      #define spl           " "
      #define rt            return
      #define arr(a,n)      rep(i,0,n) cin>>a[i]
      #define mod           998244353
      #define time          cout << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
      #define INF           1ll<<31
      void __print(int x) {cerr << x;}
      void __print(long x) {cerr << x;}
      void __print(long long x) {cerr << x;}
      void __print(unsigned x) {cerr << x;}
      void __print(unsigned long x) {cerr << x;}
      void __print(unsigned long long x) {cerr << x;}
      void __print(float x) {cerr << x;}
      void __print(double x) {cerr << x;}
      void __print(long double x) {cerr << x;}
      void __print(char x) {cerr << '\'' << x << '\'';}
      void __print(const char *x) {cerr << '\"' << x << '\"';}
      void __print(const string &x) {cerr << '\"' << x << '\"';}
      void __print(bool x) {cerr << (x ? "true" : "false");}
      template<typename T, typename V>
      void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
      template<typename T>
      void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
      void _print() {cerr << "]\n";}
      template <typename T, typename... V>
      void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
      #ifndef ONLINE_JUDGE
      #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
      #else
      #define debug(x...)
      #endif
      ll power(ll x, unsigned ll y, ll p)
      {
          ll res = 1;     // Initialize result
          x = x % p;       // Update x if it is more than or
                           // equal to p
          if (x == 0) return 0; // In case x is divisible by p;
          while (y > 0)
          {
              // If y is odd, multiply x with result
              if (y & 1)
                  res = (res*x) % p;

              // y must be even now
              y = y>>1; // y = y/2
              x = (x*x) % p;
          }
          return res;
      }
      ll modInverse(ll A,ll mm)
      {
          return power(A,mm-2,mm);
      }
      ll nCrModPFermat(ll n, ll r, ll p)
      {
         if (r==0)
            return 1;
          ll fac[n+1];
          fac[0] = 1;
          for (ll i=1 ; i<=n; i++)
              fac[i] = fac[i-1]*i%p;

          return (fac[n]*modInverse(fac[r],p)%p*modInverse(fac[n-r], p)%p)%p;
      }
      const ll N=3e5+500;
      ll ans[N]={0};
      void solve()
      {
        ll h;
        cin>>h;
        ll a[h+1];
        rep(i,0,h+1) cin>>a[i];
        bool f=1;
        rep(i,1,h+1)
        {
          if(a[i]>1 && a[i-1]>1)
            f=0;
        }
        if(f){
          cout<<"perfect";
          rt;
        }
        ans[1]=0;
        ll t=1,j=2;
        for(ll c=1;c<=h;c++)
        {
          rep(i,0,a[c])
          ans[j++]=t;
          t=j-1;
        }
        cout<<"ambiguous"<<endl;
        rep(i,1,j) cout<<ans[i]<<" ";cout<<endl;
        for(ll i=1;i<=j-2;i++)
        {
          if(ans[i]==ans[i+1] && ans[i+1]!=ans[i+2])
          {
            ans[i+2]=i;
            break;
          }
        }
        rep(i,1,j) cout<<ans[i]<<" ";

      }
      signed main()
      {
          ios_base::sync_with_stdio(false);
          cin.tie(0);
          ll t=1;
          //cin>>t;
          while(t--) solve();
      }


      #include <bits/stdc++.h>
      #include <ext/pb_ds/assoc_container.hpp>
      #include <ext/pb_ds/tree_policy.hpp>
      using namespace __gnu_pbds;
      using namespace std;
      #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
      #define ll            long long
      #define pb            push_back
      #define ppb           pop_back
      #define si            set <ll>
      #define endl          '\n'
      #define fr            first
      #define sc            second
      #define mii           map<ll,ll>
      #define msi           map<string,ll>
      #define mis           map<ll,string>
      #define rep(i,a,b)    for(ll  i=a;i<b;i++)
      #define all(v)        v.begin(),v.end()
      #define pii           pair<ll,ll>
      #define vi            vector<ll>
      #define vii           vector<pair<ll,ll>>
      #define vs            vector<string>
      #define sz(x)         (ll)x.size()
      #define rt            return
      #define M             1000000007
      #define bs            binary_search
      #define rev(a)        reverse(all(a));
      #define sp(n)         setprecision(n)
      #define spl           " "
      #define rt            return
      #define arr(a,n)      rep(i,0,n) cin>>a[i]
      #define mod           998244353
      #define time          cout << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
      #define INF           1ll<<31
      void __print(int x) {cerr << x;}
      void __print(long x) {cerr << x;}
      void __print(long long x) {cerr << x;}
      void __print(unsigned x) {cerr << x;}
      void __print(unsigned long x) {cerr << x;}
      void __print(unsigned long long x) {cerr << x;}
      void __print(float x) {cerr << x;}
      void __print(double x) {cerr << x;}
      void __print(long double x) {cerr << x;}
      void __print(char x) {cerr << '\'' << x << '\'';}
      void __print(const char *x) {cerr << '\"' << x << '\"';}
      void __print(const string &x) {cerr << '\"' << x << '\"';}
      void __print(bool x) {cerr << (x ? "true" : "false");}
      template<typename T, typename V>
      void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
      template<typename T>
      void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
      void _print() {cerr << "]\n";}
      template <typename T, typename... V>
      void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
      #ifndef ONLINE_JUDGE
      #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
      #else
      #define debug(x...)
      #endif
      ll power(ll x, unsigned ll y, ll p)
      {
          ll res = 1;     // Initialize result
          x = x % p;       // Update x if it is more than or
                           // equal to p
          if (x == 0) return 0; // In case x is divisible by p;
          while (y > 0)
          {
              // If y is odd, multiply x with result
              if (y & 1)
                  res = (res*x) % p;

              // y must be even now
              y = y>>1; // y = y/2
              x = (x*x) % p;
          }
          return res;
      }
      ll modInverse(ll A,ll mm)
      {
          return power(A,mm-2,mm);
      }
      ll nCrModPFermat(ll n, ll r, ll p)
      {
         if (r==0)
            return 1;
          ll fac[n+1];
          fac[0] = 1;
          for (ll i=1 ; i<=n; i++)
              fac[i] = fac[i-1]*i%p;

          return (fac[n]*modInverse(fac[r],p)%p*modInverse(fac[n-r], p)%p)%p;
      }
      const ll N=3e5+500;
      ll ans[N]={0};
      void solve()
      {
        ll h;
        cin>>h;
        ll a[h+1];
        rep(i,0,h+1) cin>>a[i];
        bool f=1;
        rep(i,1,h+1)
        {
          if(a[i]>1 && a[i-1]>1)
            f=0;
        }
        if(f){
          cout<<"perfect";
          rt;
        }
        ans[1]=0;
        ll t=1,j=2;
        for(ll c=1;c<=h;c++)
        {
          rep(i,0,a[c])
          ans[j++]=t;
          t=j-1;
        }
        cout<<"ambiguous"<<endl;
        rep(i,1,j) cout<<ans[i]<<" ";cout<<endl;
        for(ll i=1;i<=j-2;i++)
        {
          if(ans[i]==ans[i+1] && ans[i+1]!=ans[i+2])
          {
            ans[i+2]=i;
          }
        }
        rep(i,1,j) cout<<ans[i]<<" ";

      }
      signed main()
      {
          ios_base::sync_with_stdio(false);
          cin.tie(0);
          ll t=1;
          //cin>>t;
          while(t--) solve();
      }


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev;
    if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }
    bool flag=true;
    for(int i=2;i<=h;i++)
    {
        if(a[i-1]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"perfect"<<endl;
    else
    {
        cout<<"ambigious"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev=1;
   /* if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }*/
    bool flag=true;
    for(int i=2;i<=h;i++)
    {
        if(a[i-1]>1 && a[i]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"perfect"<<endl;
    else
    {
        cout<<"ambiguous"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev;
    if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }
    bool flag=true;
    for(int i=2;i<=h;i++)
    {
        if(a[i-1]>1 && a[i]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"Perfect"<<endl;
    else
    {
        cout<<"ambigious"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev=1;
   /* if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }*/
    bool flag=true;
    for(int i=1;i<=h;i++)
    {
        if(a[i-1]>1 && a[i]>1 && flag==true)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"perfect"<<endl;
    else
    {
        cout<<"ambiguous"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev;
    if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }
    bool flag=true;
    for(int i=2;i<=h;i++)
    {
        if(a[i-1]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"perfect"<<endl;
    else
    {
        cout<<"ambiguous"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev;
    if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }
    bool flag=true;
    for(int i=2;i<=h;i++)
    {
        if(a[i-1]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"Perfect"<<endl;
    else
    {
        cout<<"ambigious"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev=1;
   /* if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }*/
    bool flag=true;
    for(int i=1;i<=h;i++)
    {
        if(a[i-1]>1 && a[i]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"perfect"<<endl;
    else
    {
        cout<<"ambiguous"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main()
{
    int h;
    cin>>h;
    int a[h+1];
    int total=0;
    for(int i=0;i<=h;i++){
    cin>>a[i];
    total+=a[i];
    }
    vector<int>ans1(total+1);
    vector<int>ans2(total+1);
    ans1[1]=0;
    ans2[1]=0;
    int curr=1;
    int prev;
    if(a[1]==2)
    {
        ans1[2]=1;
        ans2[2]=1;
        ans1[3]=1;
        ans2[3]=1;
        prev=3;
    }
    else if(a[1]==1)
    {
        ans1[2]=1;
        ans2[2]=1;
        prev=2;
    }
    bool flag=true;
    for(int i=2;i<=h;i++)
    {
        if(a[i-1]>1 && a[i]>1)
        {
            flag=false;
          //  cout<<i<<"GFds"<<endl;
            curr=a[i];
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            ans2[prev+1]=prev-1;
            prev=last;
        }
        else
        {
             curr=a[i];
             //cout<<i<<"tFDs"<<endl;
            int last=prev+curr;
            for(int j=prev+1;j<=last;j++)
            {
                ans1[j]=prev;
                ans2[j]=prev;
            }
            prev=last;

        }
       // cout<<"bv"<<i<<endl;
    }
    if(flag)
    cout<<"perfect"<<endl;
    else
    {
        cout<<"ambiguous"<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans1[i]<<" ";
        cout<<endl;
        for(int i=1;i<=total;i++)
        cout<<ans2[i]<<" ";
    }
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mem(a,b) memset(a,b,sizeof(a))
#define P pair< int , int >
#define pb push_back
#define eps 1e-6
#define MOD 1e9+7
#define pll pair<int ,int >
const int maxn= 200000+10;
const int INF = 0x3f3f3f3f;
int tree[maxn];
int main()
{
    int n;
    cin>>n;
    bool fg=0;
    for(int i=1;i<=n+1;i++)
    {
        scanf("%d",&tree[i]);
        if(tree[i]>=2&&tree[i-1]>=2)
            fg=1;
    }
    if(!fg)
        return 0*puts("perfect");
        int root=0;
        cout<<"ambiguous"<<endl;
    for(int i=1;i<=n+1;i++)
    {
        for(int j=1;j<=tree[i];j++)
        {
            cout<<root<<" ";
        }
        root+=tree[i];
    }
    cout<<endl;
    cout<<0<<" ";
    root=1;
    for(int i=2;i<=n+1;i++)
    {
        if(tree[i-1]>1&&tree[i]>=2)
        {
            cout<<root-1<<" ";
            for(int j=2;j<=tree[i];j++)
                cout<<root<<" ";
                root+=tree[i];
        }
        else
        {
            for(int j=1;j<=tree[i];j++)
                cout<<root<<" ";
            root+=tree[i];
        }

    }
    cout<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mem(a,b) memset(a,b,sizeof(a))
#define P pair< int , int >
#define pb push_back
#define eps 1e-6
#define MOD 1e9+7
#define pll pair<int ,int >
const int maxn= 200000+10;
const int INF = 0x3f3f3f3f;
int tree[maxn];
int main()
{
    int n;
    cin>>n;
    bool fg=0;
    for(int i=1;i<=n+1;i++)
    {
        scanf("%d",&tree[i]);
        if(tree[i]>=2&&tree[i-1]>=2)
            fg=1;
    }
    if(!fg)
        return 0*puts("perfect");
        int root=0;
        cout<<"ambiguous"<<endl;
    for(int i=1;i<=n+1;i++)
    {
        for(int j=1;j<=tree[i];j++)
        {
            cout<<root<<" ";
        }
        root+=tree[i];
    }
    cout<<endl;
    cout<<0<<" ";
    root=1;
    for(int i=2;i<=n+1;i++)
    {
        if(tree[i-1]>1&&tree[i]>=2)
        {
            cout<<root-1<<" ";
            for(int j=2;j<=tree[i];i++)
                cout<<root<<" ";
                root+=tree[i];
        }
        else
        {
            for(int j=1;j<=tree[i];j++)
                cout<<root<<" ";
            root+=tree[i];
        }

    }
    cout<<endl;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// template<class T>
// using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int h = 0;

  cin >> h;

  vector<int> a(h + 1);

  int ok = -1, am = 0;

  for(int i = 0; i < h + 1; i++) {
    cin >> a[i];
    am += a[i];
    if(i && a[i] > 1 && a[i - 1] > 1) ok = 1;
  }

  if(ok == -1) { cout << "perfect\n"; return 0; }

  cout << "ambiguous\n";

  int left = 1, cur = 0, cpos = 0;

  for(int i = 0; i < am; i++) {
    cout << cur << ' ';
    left--;
    if(left == 0) {
      left = a[++cpos];
      cur = i + 1;
    }
  }

  cout << endl;

  bool u = false;

  left = 1, cur = 0, cpos = 0;

  for(int i = 0; i < am; i++) {
    cout << cur << ' ';
    left--;
    if(!u && cpos && a[cpos - 1] > 1 && a[cpos] > 1) {
      u = true;
      cur--;
    }
    if(!left) {
      left = a[++cpos];
      cur = i + 1;
    }
  }

  return 0;
}
/*

*/


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <cmath>
#include <queue>
#include <bitset>
#include <numeric>
#include <array>
#include <cstring>
#include <random>
#include <chrono>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin())
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// template<class T>
// using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
int main() {

  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  int h = 0;

  cin >> h;

  vector<int> a(h);

  int ok = -1, am = 0;

  for(int i = 0; i < h + 1; i++) {
    cin >> a[i];
    am += a[i];
    if(i && a[i] > 1 && a[i - 1] > 1) ok = 1;
  }

  if(ok == -1) { cout << "perfect\n"; return 0; }

  cout << "ambigious\n";

  int left = 1, cur = 0, cpos = 0;

  for(int i = 0; i < am; i++) {
    cout << cur << ' ';
    left--;
    if(left == 0) {
      left = a[++cpos];
      cur = i + 1;
    }
  }

  cout << endl;

  bool u = false;

  left = 1, cur = 0, cpos = 0;

  for(int i = 0; i < am; i++) {
    cout << cur << ' ';
    left--;
    if(!u && cpos && a[cpos - 1] > 1 && a[cpos] > 1) {
      u = true;
      cur--;
    }
    if(!left) {
      left = a[++cpos];
      cur = i + 1;
    }
  }

  return 0;
}
/*

*/