{$R+,Q+}
const
  NMAX = 100;

type
  TArray = array[0..NMAX,1..NMAX] of LongInt;
  PArray = ^TArray;

  TNodeString = String[255];
  PNode = ^TNode;
  TNode = record
    h: Integer;
    left,right: PNode;
    s: TNodeString;
  end;

var
  N,i,j,l: Integer;
  r: PArray;
  Count: LongInt;
  s: String;
  ex: array[1..NMAX] of Integer;
  Nex: Integer;

  root: PNode;
  Tree_Error: Boolean;
  Tree_Count: LongInt;

function min(a,b: Integer): Integer;
begin
 if a<b then min:=a else min:=b;
end;

function FindCount(N: Integer):LongInt;
var
 i,j,l: Integer;
begin
  new(r);
  for j:=1 to N do r^[0,j]:=1;
  for i:=1 to N do
   for j:=1 to N do
   begin
     r^[i,j] := 0;
     for l:=1 to min(j,i) do r^[i,j]:=r^[i,j]+r^[i-l,l];
  end;
  FindCount := r^[N,N]-1;
  dispose(r);
end;

procedure PE;
begin
  writeln('Presentation error');
  halt;
end;

procedure quicksort;
procedure sort(l,r: integer);
var
  i,j,x,y: integer;
begin
  i:=l; j:=r; x:=ex[(l+r) DIV 2];
  repeat
    while ex[i]<x do i:=i+1;
    while x<ex[j] do j:=j-1;
    if i<=j then
    begin
      y:=ex[i]; ex[i]:=ex[j]; ex[j]:=y;
      i:=i+1; j:=j-1;
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin {quicksort};
  sort(1,Nex);
end;

function CheckAndNormalize(s:String):String;
var
  i: Integer;
  sum: Integer;
  buf,r: String;
  num,code,len: Integer;
  plus: boolean;

procedure Number;
begin
  if i>len then PE;
  if not (s[i] in ['1'..'9']) then PE;
  buf:='';
  while (i<=length(s)) and (s[i] in ['0'..'9']) do begin
    buf := buf+s[i];
    inc(i);
  end;
  if length(buf)>3 then PE;
  val(buf,num,code);
  inc(Nex);
  ex[Nex]:=num;
end;

begin
  sum := 0;
  i :=1 ;
  Nex := 0;
  len := Length(s);
  plus := false;

  Number;

  while true do begin

    (*check end*)
    if i>len then
    begin
      if not plus then PE;
      QuickSort;
      str(ex[1],r);
      Num := ex[1];
      for i:=2 to Nex do
      begin
        r:=r+'+';
        str(ex[i],buf);
        r:=r+buf;
        Num:=Num+ex[i];
      end;
      if Num<>N then PE;
      CheckAndNormalize := r;
      exit;
    end;

    if s[i]<>'+' then PE;
    plus:=True;
    inc(i);

    Number;

  end;
end;

function hash: Integer;
var
  i: Integer;
  sum : LongInt;
begin
 for i:=1 to Nex do sum:=sum+sqr(ex[i]);
 hash := sum mod sqr(N);
end;

procedure AddToTree(s: String; h: Integer);
var
 p,q: PNode;
function less:boolean;
begin
 less:=false;
 if h<p^.h then less:=true else
   if (p^.h=h)and(s<p^.s) then less:=true;
end;
begin

  if root=nil then
  begin
    getmem(root,sizeof(TNode)-sizeof(TNodeString)+length(s)+1);
    root^.left := nil;
    root^.right := nil;
    root^.h := h;
    root^.s := s;
    inc(Tree_Count);
    exit;
  end;

  p:=root;
  while true do
  begin

    if (p^.h=h)and(p^.s=s) then
    begin
      Tree_Error := true;
      exit;
    end;

    if less then
      if p^.left<>nil then
      begin
        p:=p^.left;
        continue;
      end else
      begin
        getmem(q,sizeof(TNode)-sizeof(TNodeString)+length(s)+1);
        q^.left := nil;
        q^.right := nil;
        q^.h := h;
        q^.s := s;
        inc(Tree_Count);
        p^.left := q;
        exit;
      end;

    if p^.right<>nil then
    begin
      p:=p^.right;
      continue;
    end else
    begin
      getmem(q,sizeof(TNode)-sizeof(TNodeString)+length(s)+1);
      q^.left := nil;
      q^.right := nil;
      q^.h := h;
      q^.s := s;
      inc(Tree_Count);
      p^.right := q;
      exit;
    end;

  end;
end;

begin

//  assign(input,'input.txt');
//  reset(input);
//  assign(output,'output.txt');
//  rewrite(output);

  root := nil;
  Tree_Error := false;
  Tree_Count := 0;
  readln(N);
  if eof then begin
    writeln('Presentation error');
    halt;
  end;
  Count := FindCount(N);
  while not eof do
  begin
    readln(s);
    s := CheckAndNormalize(s);
    AddToTree(s,hash);
  end;

  if Tree_Error or (Tree_Count<>Count) then
  begin
    writeln('Wrong answer');
    exit;
  end;

  writeln('Accepted');

 end.
