Problem: As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. Each showman should consist of three snowballs: a big one, a medium one and a small one. Sergey's twins help him: they've already made n snowballs with radii equal to r1, r2, ..., rn. To make a snowman, one needs any three snowballs whose radii are pairwise different. For example, the balls with radii 1, 2 and 3 can be used to make a snowman but 2, 2, 3 or 2, 2, 2 cannot. Help Sergey and his twins to determine what maximum number of snowmen they can make from those snowballs.

Input

The first line contains integer n (1 ≤ n ≤ 105) — the number of snowballs. The next line contains n integers — the balls' radii r1, r2, ..., rn (1 ≤ ri ≤ 109). The balls' radii can coincide.

Output

Print on the first line a single number k — the maximum number of the snowmen. Next k lines should contain the snowmen's descriptions. The description of each snowman should consist of three space-separated numbers — the big ball's radius, the medium ball's radius and the small ball's radius. It is allowed to print the snowmen in any order. If there are several solutions, print any of them.

Examples

Input

7
1 2 3 4 5 6 7


Output

2
3 2 1
6 5 4


Input

3
2 2 3


Output

0

Solution (in PYTHON):

Solution:
#input = [1,2,3,4,5,6,6,6,7,9,9,9,9,2,2,2,2,5,5,5,1,2,3,4,5,6,7]
input = []
#rint("Try generate...")
if False:
	for x in xrange(20):
		input.append(1)
	for x in xrange(20):
		input.append(2)
	for x in xrange(20):
		input.append(3)
	for x in xrange(20):
		input.append(4)
	for x in xrange(20):
		input.append(5)
else:
	import sys
	n = int(sys.stdin.readline())
	for s in sys.stdin.readline().split(" "):
		input.append(int(s))

#print("input is ", input)
#print("Try found eq...")
inputMap = {}
for x in input:
	if not x in inputMap:
		inputMap[x] = 1
	else:
		inputMap[x] += 1
		
#print("inputMap is", inputMap)
		
class Cell():
	def __repr__(self):
		return "count = {0} val = {1}".format(self.count, self.val)
	def __lt__(self, other):
		return self.count < other.count
	def Take(self):
		self.count -= 1
		return self.val
	
cellList = []
for x in inputMap:

	cell = Cell()
	cell.count = inputMap[x]
	cell.val = x
	cellList.append(cell)
	
#print("Try sort...")

cellList.sort(reverse=True)

#print("cellList is ", cellList)

#print("Try alg...")
#import time
outPut = []
dur = 0
dur2 = 0
curLen = len(cellList)
i0 = 0
i1 = 1
i2 = 2
while(curLen >= 3):
	if curLen <= 6:
		cellList.sort(reverse=True)
		i0 = 0
		i1 = 1
		i2 = 2
	#s = time.clock()
	v0 = cellList[i0]
	v1 = cellList[i1]
	v2 = cellList[i2]
	outPut.append((v0.Take(), v1.Take(), v2.Take()))

	#dur2 += time.clock() -s
	#s = time.clock()
	if v0.count == 0:
		curLen -=1
		while(True):
			i0 += 1
			if i0 >= len(cellList)-1:
				break
			if i0 != i1 and i0 != i2 and cellList[i0].count != 0:
				break
	if v1.count == 0:
		curLen -=1
		while(True):
			i1 += 1
			if i1 >= len(cellList)-1:
				break
			if i1 != i2 and i1 != i0 and cellList[i1].count != 0:
				break
	if v2.count == 0:
		curLen -=1
		while(True):
			i2 += 1
			if i2 >= len(cellList)-1:
				break
			if i2 != i1 and i2 != i0 and cellList[i2].count != 0:
				break
	#dur += time.clock() -s
#print(dur)
#print(dur2)

print(len(outPut))
for x in outPut:
	x = sorted(x, reverse=True)
	cur = "{0} {1} {2}".format(x[0], x[1], x[2])
	print(cur)
#print(outPut)