using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication76
{
    class Program
    {
        static void Main(string[] args)
        {
            int num = Convert.ToInt32(Console.ReadLine());
            separateDigits(num);          
        }

        static void separateDigits(int n)
        {
            if (n < 10)
            {
                Console.Write(" {0} ", n);
                return;
            }   
            separateDigits(n / 10);
            Console.Write(" {0} ", n % 10);
        }
    }
}