def write_out(out, triple, outfile):
    """
    Take the output from test_triple() and write it to file.
    """
    print(triple[0], '\t', triple[1], '\t', triple[2], '\t', sep='', end='',
        file=outfile)
    print(out['Zscore'], '\t', sep='', end='', file=outfile)
    print(out['Pvalue'], '\t', sep='', end='', file=outfile)
    print(out['Gamma'], '\t', sep='', end='', file=outfile)
    print(out['AAAA'], '\t', sep='', end='', file=outfile)
    print(out['AAAB'], '\t', sep='', end='', file=outfile)
    print(out['AABA'], '\t', sep='', end='', file=outfile)
    print(out['AABB'], '\t', sep='', end='', file=outfile)
    print(out['AABC'], '\t', sep='', end='', file=outfile)
    print(out['ABAA'], '\t', sep='', end='', file=outfile)
    print(out['ABAB'], '\t', sep='', end='', file=outfile)
    print(out['ABAC'], '\t', sep='', end='', file=outfile)
    print(out['ABBA'], '\t', sep='', end='', file=outfile)
    print(out['BAAA'], '\t', sep='', end='', file=outfile)
    print(out['ABBC'], '\t', sep='', end='', file=outfile)
    print(out['CABC'], '\t', sep='', end='', file=outfile)
    print(out['BACA'], '\t', sep='', end='', file=outfile)
    print(out['BCAA'], '\t', sep='', end='', file=outfile)
    print(out['ABCD'], '\n', sep='', end='', file=outfile)
