#!/usr/bin/env perl use strict; use warnings; my $s = <>; for my $c (split //, $s) { if ($c eq 'I' || $c eq 'l') { print '1' } elsif ($c eq 'O' || $c eq 'o') { print '0' } else { print $c } }