IDENTIFICATION DIVISION.
PROGRAM-ID. 152B.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INP  PIC X(10).
01 A    PIC 9(1).
01 B    PIC 9(1).
01 N    PIC 9(1).
01 I    PIC 9(1).
01 OUT  PIC X(10).
*>
PROCEDURE DIVISION.
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ' '
      INTO A B.
  IF (A <= B)
    MOVE B TO N
  ELSE
    MOVE A TO N
    MOVE B TO A
  END-IF.   
*>
  PERFORM VARYING I FROM 1 BY 1 UNTIL I > N
    MOVE A TO OUT(I:1)
  END-PERFORM.
*>
  DISPLAY OUT(1:N).
*>
  STOP RUN.
