package body Stacks is
   procedure Second (S : Stack; X : out Integer) is
   begin
      X := 0;
      if S.Top /= null and then S.Top.Next /= null then
         X := S.Top.Next.Value;
      end if;
   end Second;
end Stacks;
