type
PStack = ^Stack;
Stack = record
data: integer;
next: PStack;
end;
PQueue = ^Queue;
Queue = record
data: integer;
next: PQueue;
end;
TQueue = record
head: PQueue;
tail: PQueue;
end;
begin
end.
CnR5cGUKICBQU3RhY2sgPSBeU3RhY2s7CiAgU3RhY2sgPSByZWNvcmQKICAgIGRhdGE6IGludGVnZXI7CiAgICBuZXh0OiBQU3RhY2s7CiAgZW5kOwogIFBRdWV1ZSA9IF5RdWV1ZTsKICBRdWV1ZSA9IHJlY29yZAogICAgZGF0YTogaW50ZWdlcjsKICAgIG5leHQ6IFBRdWV1ZTsKICBlbmQ7CiAgVFF1ZXVlID0gcmVjb3JkCiAgICBoZWFkOiBQUXVldWU7CiAgICB0YWlsOiBQUXVldWU7CiAgZW5kOwogCmJlZ2luCmVuZC4=