#!/usr/bin/env python
import sys
import commands

a = [ "abc", "abcdef", "abc", "abc", "abc", "", "" ]
b = [ "abc", "abc", "abcdef", "def", "", "abc", "" ]
output = [ 0, 1, -1, -1, 1, -1, 0 ]

for i in range(len(output)):
  cmd = "./compare '" + a[i] + "' '" + b[i] + "'"
  result = int(commands.getoutput(cmd))
  if result < 0:
    result = -1
  elif result > 0:
    result = 1
  print cmd + " = " + repr(result)
  if result != output[i]:
    sys.exit(1)
