(define v (map string->number (string-split (read-line) " "))) (define (c i v) (cond ((= (car v) 9) 10) ((= (car i) (car v)) (c (cdr i) (cdr v))) (else (car i)))) (print (c (iota 10 1) v))