PROGRAM GoTo2(Output);
    LABEL
        1;
    VAR
        C: Char;
        InvalidInput: Boolean;
BEGIN
    C := '9';
    InValidInput := False;

    IF NOT (C IN ['0'..'9']) THEN
    BEGIN
        InValidInput := True;
        GOTO 1
    END;

    WriteLn(Output, 'Entered character accepted: ', C);

1:  IF InvalidInput THEN
        WriteLn(Output, 'Invalid Input')
    ELSE
        WriteLn(Output, 'Program done.')
END.

