(define (System.out.println x) (begin (display x) (newline) ) ) (let ( (S (string->list (symbol->string (read)))) ) (let loop( (i 0) (Result '()) ) (if (char-upper-case? (list-ref S i)) (if (= i (- (length S) 1)) (System.out.println (list->string (reverse (cons (char-downcase (list-ref S i)) Result)))) (loop (+ i 1) (cons (char-downcase (list-ref S i)) Result)) ) (if (= i (- (length S) 1)) (System.out.println (list->string (reverse (cons (char-upcase (list-ref S i)) Result)))) (loop (+ i 1) (cons (char-upcase (list-ref S i)) Result)) ) ) ) )