{
Written by Fyodor Menshikov 07.02.2004
14:49-15:36
}
{$APPTYPE CONSOLE}
   procedure ac;
   begin
      writeln('Accepted');
      halt;
   end;

   procedure wa;
   begin
      writeln('Wrong answer');
      halt;
   end;

   procedure pe(id:integer);
   begin
      writeln('Presentation error'{,id});
      halt;
   end;

var
   n:integer;
   c:char;

   procedure nextchar;
   begin
      if eoln then begin
         c:=#13;
         {writeln;}
      end
      else begin
         read(c);
         {write(c);}
      end;
   end;

   procedure readnum(var num:integer);
   begin
      if not (c in ['1'..'9']) then
         pe(1);
      num:=0;
      while c in ['0'..'9'] do begin
         num:=num*10+(ord(c)-ord('0'));
         if num>=n then
            pe(2);
         nextchar;
      end;
   end;

   procedure checkline;
   var
      t:integer;
      s:integer;
   begin
      nextchar;
      readnum(t);
      s:=t;
      if c<>'+' then{at least one plus}
         pe(3);
      while c='+' do begin
         nextchar;
         readnum(t);
         s:=s+t;
         if s>n then
            pe(4);
      end;
      if s<n then
         pe(5);
      if c<>#13 then
         pe(6);
      readln;
   end;

var
   judgecount:integer;

   procedure go(place,rem,min:integer);
   var
      i:integer;
   begin
      if rem=0 then
         inc(judgecount)
      else begin
         for i:=min to rem do
            go(place+1,rem-i,i);
      end;
   end;

type
   line=array[1..40]of integer;

   procedure readline(var l:line);
   var
      linelen,i:integer;
   begin
      nextchar;
      readnum(l[1]);
      linelen:=1;
      while c='+' do begin
         nextchar;
         inc(linelen);
         readnum(l[linelen]);
      end;
      readln;
      for i:=linelen+1 to high(line) do
         l[i]:=0;
   end;

   procedure sortline(var l:line);
   var
      i,j,t:integer;
   begin
      for i:=1 to high(l) do
         for j:=1 to high(l) do
            if (i<j)and(l[i]<l[j]) then begin
               t:=l[i];
               l[i]:=l[j];
               l[j]:=t;
            end;
   end;

   function linecmp(var l1,l2:line):integer;
   var
      i:integer;
   begin
      for i:=1 to high(line) do begin
         if l1[i]<l2[i] then begin
            linecmp:=-1;
            exit;
         end
         else if l1[i]>l2[i] then begin
            linecmp:=1;
            exit;
         end;
      end;
      linecmp:=0;
   end;

var
   lines:array[1..40000]of line;
var
   key,buf:line;

   procedure sort(l,r:integer);
   var
      i,j:integer;
   begin
      key:=lines[random(r-l+1)+l];
      i:=l;
      j:=r;
      repeat
         while linecmp(lines[i],key)<0 do
            inc(i);
         while linecmp(key,lines[j])<0 do
            dec(j);
         if i<=j then begin
            buf:=lines[i];
            lines[i]:=lines[j];
            lines[j]:=buf;
            inc(i);
            dec(j);
         end;
      until i>j;
      if l<j then
         sort(l,j);
      if i<r then
         sort(i,r);
   end;

var
   linecount,i:integer;
begin
   randomize;
//   assign(input,'input.txt');
//   reset(input);
//   assign(output,'output.txt');
//   rewrite(output);
   readln(n);
   if eof then
      pe(7);
   {checking pe}
   linecount:=0;
   while not eof do begin
      checkline;
      inc(linecount);
   end;
   {finding number of lines required}
   judgecount:=-1;{line without '+' will be counted}
   go(1,n,1);
   if judgecount<>linecount then
      wa;
   {loading data}
   reset(input);
   readln(n);
   for i:=1 to judgecount do begin
      readline(lines[i]);
      sortline(lines[i]);
   end;
   {sorting}
   sort(1,judgecount);
   {checking that all different}
   for i:=1 to judgecount-1 do
      if linecmp(lines[i],lines[i+1])=0 then
         wa;
   ac;
end.