trivial charactor filter program. using put/get.