import sys

def conv_obj(obj):
	vertex_positions = []
	triangle_vertices = []
	lines = obj.splitlines()

	for line in lines:
		line = line.strip()
		if line.startswith("v "):
			parts = line.split()

			# or do parts[2] too if 3D, adjust with your axis
			vertex_positions.append([float(parts[1]), float(parts[3])])
		elif line.startswith("f "):
			parts = line.split()
			v1 = vertex_positions[int(parts[1].split("/")[0]) - 1]
			v2 = vertex_positions[int(parts[2].split("/")[0]) - 1]
			v3 = vertex_positions[int(parts[3].split("/")[0]) - 1]
			triangle_vertices.extend(v1 + v2 + v3)

	return triangle_vertices

if __name__ == "__main__":
	obj_data = sys.stdin.read()
	result = conv_obj(obj_data)
	print(result)