def get_best_outputs(problem_dir, problem, user):
    """
        Gets outputs of best submission.
        :param problem_dir: main directory of submissions
        :param problem: id of problem
        :param user: user who wants to see submission for problem
        :return: -1 if no file found, otherwise array of best outputs
    """

    outputs = []
    try:
        for i in range(10):
            outputs.append('')
            f = open('{0}/best_out/out_{1}_{2}_{3}'.format(problem_dir, problem, user, i))
            for line in f:
                outputs[i] += line.strip()
            f.close()
    except IOError:
        return -1
    return outputs