      SUBROUTINE MAIN
      LOGICAL*1 NSTR(12)
      INTEGER I, N
      INTEGER ALLDIG, CTOI, GETARG
      LOGICAL*1 DIGSTR(11)
      LOGICAL*1 USESTR(19)
      DATA DIGSTR(1)/48/,DIGSTR(2)/49/,DIGSTR(3)/50/,DIGSTR(4)/51/,DIGST
     *R(5)/52/,DIGSTR(6)/53/,DIGSTR(7)/54/,DIGSTR(8)/55/,DIGSTR(9)/56/,D
     *IGSTR(10)/57/,DIGSTR(11)/0/
      DATA USESTR(1)/117/,USESTR(2)/115/,USESTR(3)/97/,USESTR(4)/103/,US
     *ESTR(5)/101/,USESTR(6)/58/,USESTR(7)/32/,USESTR(8)/32/,USESTR(9)/1
     *14/,USESTR(10)/117/,USESTR(11)/108/,USESTR(12)/101/,USESTR(13)/114
     */,USESTR(14)/32/,USESTR(15)/91/,USESTR(16)/110/,USESTR(17)/93/,USE
     *STR(18)/46/,USESTR(19)/0/
      CALL QUERY(USESTR)
      IF (.NOT.( GETARG( 1, NSTR, 12) .EQ. -1 ))GOTO 23000
      N = 80
      GOTO 23001
23000 CONTINUE
      IF (.NOT.( ALLDIG( NSTR) .EQ. 0 ))GOTO 23002
      CALL ERROR(USESTR)
      GOTO 23003
23002 CONTINUE
      I = 1
      N = CTOI( NSTR, I)
      N = MIN0( N, 512)
      N = MAX0( N, 1)
23003 CONTINUE
23001 CONTINUE
      I = 1 
23004 IF (.NOT.(I .LE. N ))GOTO 23006
      IF (.NOT.( MOD( I, 10) .EQ. 0 ))GOTO 23007
      CALL PUTCH( 43,2)
      GOTO 23008
23007 CONTINUE
      CALL PUTCH( 45,2)
23008 CONTINUE
23005 I = I + 1 
      GOTO 23004
23006 CONTINUE
      CALL PUTCH( 10,2)
      I = 1 
23009 IF (.NOT.(I .LE. N ))GOTO 23011
      IF (.NOT.( MOD( I, 10) .EQ. 0 ))GOTO 23012
      CALL PUTCH( DIGSTR( MOD( MOD( I, 100)/10, 10) + 1 ),2)
      GOTO 23013
23012 CONTINUE
      CALL PUTCH( 32,2)
23013 CONTINUE
23010 I = I + 1 
      GOTO 23009
23011 CONTINUE
      CALL PUTCH( 10,2)
      I = 1 
23014 IF (.NOT.(I .LE. N ))GOTO 23016
      CALL PUTCH( DIGSTR( MOD( I, 10) + 1 ),2)
23015 I = I + 1 
      GOTO 23014
23016 CONTINUE
      CALL PUTCH( 10,2)
      I = 1 
23017 IF (.NOT.(I .LE. N ))GOTO 23019
      IF (.NOT.( MOD( I, 10) .EQ. 0 ))GOTO 23020
      CALL PUTCH( 43,2)
      GOTO 23021
23020 CONTINUE
      CALL PUTCH( 45,2)
23021 CONTINUE
23018 I = I + 1 
      GOTO 23017
23019 CONTINUE
      CALL PUTCH( 10,2)
      RETURN
      END
