Program ObjSize;

Type
  FirstPtr = ^FirstObj;
  SecondPtr = ^SecondObj;

FirstObj = object
  p: Pointer;
  a, b: Integer;
  Constructor Init;
end (* FirstObj *);

SecondObj = object ( FirstObj )
  c, d: Integer;
end (* FirstObj *);

Var
  p: FirstPtr;
  O: FirstObj;

Constructor FirstObj.Init;

begin (* FirstObj.Init *)
  (* empty *)
end (* FirstObj.Init *);

begin
  O.Init;
  p:= @O;
  if SizeOf ( p^ ) = 2 * SizeOf ( Pointer ) + 2 * SizeOf ( Integer ) then
    write ( 'O' );
  p:= New ( SecondPtr, Init );
  if SizeOf ( p^ ) = 2 * SizeOf ( Pointer ) + 4 * SizeOf ( Integer ) then
    writeln ( 'K' );
end.
