python and ruby version of test input.