program Project1;

{$APPTYPE CONSOLE}
type box=record h,v:integer;end;
var
{a: array [1..6] of box;
 } a: array [1..12] of integer;
 temp,x,col,j,i:integer;
 fi,fo:text;
 f:boolean;
begin
        assign(fi,'box.in');
        reset(fi);
        for i:=1 to 12 do
                begin
                read(fi,a[i]);
                end;
        close(fi);
        f:=true;

        assign(fo,'box.out');
        rewrite(fo);

        for i:=1 to 12 do
                begin
                      if a[i]=0 then continue;
                      temp:=a[i];
                      col:=0;
                      for j:= 1 to 12 do
                      if a[j]=temp then begin col:=col+1;a[j]:=0;end;
                      if col mod 4 <> 0 then begin writeln(fo,'IMPOSSIBLE');f:=false;break;end;
                end;

if f then writeln(fo,'POSSIBLE');
close(fo);

end.
