new file:   negaternary.py