IDENTIFICATION DIVISION.
PROGRAM-ID. PROGRAM_ID.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 LN             PIC X(3).
01 a              PIC 9(1).
01 b              PIC 9(1).
01 i              PIC 9(2).
01 ans            PIC X(9).

PROCEDURE DIVISION.
  ACCEPT LN.
  UNSTRING LN DELIMITED BY SPACE INTO a b.
  IF a < b
      PERFORM VARYING i FROM 1 BY 1 UNTIL b < i
          MOVE a TO ans(i:1)
      END-PERFORM
  ELSE
      PERFORM VARYING i FROM 1 BY 1 UNTIL a < i
          MOVE b TO ans(i:1)
      END-PERFORM
  END-IF.
  DISPLAY ans.
  STOP RUN.
