program z1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
  var n,i,j, count:integer;
  a,b,c :array[0..12] of word;

procedure init;
 begin
  assign(input,'box.in');
  assign(output,'box.out');
  reset(input);
  rewrite(output);
  fillchar(a, sizeof(a),0);
  fillchar(b, sizeof(b),0);
  fillchar(c, sizeof(c),0);
  count := 0;
  for i:= 1 to 12 do
   begin
    read(a[i]);
    j:= 0;
    while (j<=count) and (a[i]<>b[j]) do inc(j);
    if j > count then
     begin
      inc(count);
      b[count]:=a[i];
     end;
   end;
 end;

procedure solve;
 begin
  if count > 3 then write('IMPOSSIBLE')
  else if count = 1 then
   begin
    write('POSSIBLE');
   end
  else if count = 2 then
   begin
    for i:=1to 6 do
     begin
      if ((a[2*i-1]=b[1])and(a[2*i]=b[2])) or
      ((a[2*i-1]=b[2])and(a[2*i]=b[1]))then inc(c[1]);
      if ((a[2*i-1]=b[1])and(a[2*i]=b[1])) or
      ((a[2*i-1]=b[1])and(a[2*i]=b[1]))then inc(c[2]);
     end;
    if ((c[1]=2)and(c[2]=4))or((c[1]=4)and(c[2]=2)) then write('POSSIBLE')
    else write('IMPOSSIBLE');

   end
  else if count = 3 then
   begin
    for i:=1to 6 do
     begin
      if ((a[2*i-1]=b[1])and(a[2*i]=b[2])) or
      ((a[2*i-1]=b[2])and(a[2*i]=b[1]))then inc(c[1]);
      if ((a[2*i-1]=b[2])and(a[2*i]=b[3])) or
      ((a[2*i-1]=b[3])and(a[2*i]=b[2]))then inc(c[2]);
      if ((a[2*i-1]=b[1])and(a[2*i]=b[3])) or
      ((a[2*i-1]=b[3])and(a[2*i]=b[1]))then inc(c[3]);
     end;
    if (c[1]=2)and(c[2]=2)and(c[3]=2) then write('POSSIBLE')
    else write('IMPOSSIBLE');
   end;


 end;

procedure final;
 begin
  close(input);
  close(output);
 end;

begin
init;
solve;
final;
end.
