/* Generated by re2c */
// re2c $INPUT -o $OUTPUT -i --tags --input custom
#include <stdio.h>
#include <string.h>

static inline unsigned parse_oct(const char *s, const char *e)
{
    unsigned oct = 0;
    for (; s != e; ++s) {
        oct = oct * 10 + *s - '0';
    }
    return oct;
}

#define YYMAXFILL 16


/* at least maximal lexeme length plus YYMAXFILL */
static const size_t SIZE = YYMAXFILL * 2;

struct input_t {
    char buf[SIZE + YYMAXFILL];
    char *lim;
    char *cur;
    char *mar;
    char *tok;
    char *yyt1;char *yyt2;char *yyt3;
    bool eof;

    input_t()
        : buf()
        , lim(buf + SIZE)
        , cur(lim)
        , mar(lim)
        , tok(lim)
        , yyt1(0), yyt2(0), yyt3(0)
        , eof(false)
    {}
    bool fill(size_t need)
    {
        if (eof) {
            printf("\nfill: underflow - 1\n");
            return false;
        }
        const size_t free = tok - buf;
        if (free < need) {
            printf("\nfill: underflow - 2\n");
            return false;
        }
        memmove(buf, tok, lim - tok);
        lim -= free;
        cur -= free;
        mar -= free;
        tok -= free;
        yyt1 -= free;yyt2 -= free;yyt3 -= free;
        lim += fread(lim, 1, free, stdin);
        if (lim < buf + SIZE) {
            eof = true;
            memset(lim, 0, YYMAXFILL);
            lim += YYMAXFILL;
        }
        return true;
    }
};

static bool lex(input_t & in)
{
#define YYPEEK()           *in.cur
#define YYSKIP()           ++in.cur
#define YYBACKUP()         in.mar = in.cur
#define YYRESTORE()        in.cur = in.mar
#define YYSTAGP(t)         t = in.cur
#define YYSTAGN(t)         t = NULL
#define YYRESTORETAG(t)    in.cur = t
#define YYLESSTHAN(n)      in.lim - in.cur < n
loop:
    in.tok = in.cur;
    const char *p1, *p2, *p3;
    
{
	char yych;
	if (YYLESSTHAN(16)) if (!in.fill(16)) return false;
	yych = YYPEEK();
	switch (yych) {
		case 0x00: goto yy1;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy4;
		default: goto yy2;
	}
yy1:
	YYSKIP();
	{ return YYMAXFILL == in.lim - in.tok; }
yy2:
	YYSKIP();
yy3:
	{ return false; }
yy4:
	YYSKIP();
	YYBACKUP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt1);
			goto yy5;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy7;
		default: goto yy3;
	}
yy5:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy8;
		default: goto yy6;
	}
yy6:
	YYRESTORE();
	goto yy3;
yy7:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt1);
			goto yy5;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy9;
		default: goto yy6;
	}
yy8:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt2);
			goto yy10;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy11;
		default: goto yy6;
	}
yy9:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt1);
			goto yy5;
		default: goto yy6;
	}
yy10:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy12;
		default: goto yy6;
	}
yy11:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt2);
			goto yy10;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy13;
		default: goto yy6;
	}
yy12:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt3);
			goto yy14;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy15;
		default: goto yy6;
	}
yy13:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt2);
			goto yy10;
		default: goto yy6;
	}
yy14:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy16;
		default: goto yy6;
	}
yy15:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt3);
			goto yy14;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy17;
		default: goto yy6;
	}
yy16:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '\n': goto yy18;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy19;
		default: goto yy6;
	}
yy17:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '.':
			YYSTAGP(in.yyt3);
			goto yy14;
		default: goto yy6;
	}
yy18:
	YYSKIP();
	p1 = in.yyt1;
	p2 = in.yyt2;
	p3 = in.yyt3;
	{
            printf("> %u.%u.%u.%u\n",
                parse_oct(in.tok, p1),
                parse_oct(p1 + 1, p2),
                parse_oct(p2 + 1, p3),
                parse_oct(p3 + 1, in.cur - 1));
            goto loop;
        }
yy19:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '\n': goto yy18;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy20;
		default: goto yy6;
	}
yy20:
	YYSKIP();
	yych = YYPEEK();
	switch (yych) {
		case '\n': goto yy18;
		default: goto yy6;
	}
}

}

int main()
{
    input_t in;
    if (!lex(in)) {
        printf("error\n");
    }

    return 0;
}
