while read x; do
if expr "$x" : '[0-9][0-9]*$' > /dev/null; then
echo "$x"
else
echo -n "$x "
fi
done