#include <stdio.h>

void f(int number);

int main(void) {

    f(3579);

    return 0;

}

void f(int number) {

    if (number < 10) {
        printf("%d\n", number);
    }
    else {
        f(number / 10);
        printf("%d\n", number % 10);
    }

}