#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
 
int main()
{
    int i;
    int ch;
    char str[512];
    fgets(str, sizeof str, stdin);
 
    for (i = 0; i <= (strlen(str)); i++)
    {
        if (isdigit(str[i]))
        {
            int num = atoi(&str[i]);
            if(i && str[i-1]=='-') num *= -1;
            printf("%d\n", num);
            i += ( num==0 ) ? 1 : (int)log10(abs(num))+1;
        }
    }
 
    return 0;
}