var
    n, m: longint;
begin
    reset(input, 'game.in');
    rewrite(output, 'game.out');
    read(n, m);
    if (m = 1) then
        writeln('Ambiguous')
    else if (m = 2) then
        writeln('Unique')
    else
        writeln('Impossible');
end.