#!/usr/bin/env python
# Script per la conversione del formato DIMACS.
# DIMACS e' il formato usato dai problemi SATLIB.
#
import sys
CL=[]
def sgn(z): return 1 if z>= 0 else -1

while 1:
        l=sys.stdin.readline()
        if not l: break
        if l[0] in ('c', 'p'): continue
        CL.append([int(i)+sgn(int(i)) for i in l.split()[:-1]])

print CL
