Input in triplet format