#!/usr/pkg/bin/python3.13

import sys
import time

messages = [
    'announce route 2.2.2.2/32 next-hop 22.22.22.22',
    'announce route 3.3.3.3/32 next-hop 33.33.33.33',
]

time.sleep(2.0)
while messages:
    message = messages.pop(0)
    sys.stdout.write(message + '\n')
    sys.stdout.flush()
    time.sleep(1.0)

try:
    now = time.time()
    while True and time.time() < now + 5:
        line = sys.stdin.readline().strip()
        if not line or 'shutdown' in line:
            break
        time.sleep(1)
except IOError:
    pass
