Meeting Room Arrangement

Meeting room is always noisy, and you are thinking to separate each room users as possible as you can so that they dont feel uncomfortable.

If they are facing each other, we will add unhappy point as 1.

 

Input

[row, column, users] -> unhappy point

Input

[row, column, users] -> unhappy point

ex.

[2,3,6]

Input

[row, column, users] -> unhappy point

ex.

[2,3,6]

user1 user3 user5
user2 user4 user6

2 Rows, 3 Colujmns, 6 users

Input

[row, column, users] -> unhappy point

ex.

[2,3,6] -> 7

user1 user3 user5
user2 user4 user6

2 Rows, 3 Colujmns, 6 users

Input

[row, column, users] -> unhappy point

ex.

[3,3,8] -> 8

2 Rows, 3 Colujmns, 6 users

User1 User2 User3
User4 User5
User6 User7 User8

Question

 

[5,2,8],[3,5,14],[1,16,1],[3,5,1],[8,2,12],[16,1,1],[3,3,6],[2,6,12],[15,1,0],[5,3,7],[4,3,5],[3,5,11],[7,2,13],[15,1,6],[15,1,15],[4,4,9],[5,3,8],[3,5,6],[16,1,7],[1,15,7],[4,3,12],[5,3,13],[2,4,5],[5,3,5],[16,1,16],[2,5,8],[5,3,4],[5,3,10],[4,4,7],[3,5,9],[4,2,2],[4,4,15],[2,2,4],[5,3,11],[4,4,8],[1,16,9],[4,4,16],[1,15,6],[15,1,8],[5,3,6],[16,1,9],[3,5,15],[1,15,1],[1,15,0],[2,5,9],[3,5,10],[1,15,15],[3,2,0],[5,3,2],[5,3,1],[5,2,4],[3,5,4],[2,7,13],[3,3,0],[7,2,11],[4,4,0],[1,1,0],[2,6,9],[3,5,3],[5,3,15],[5,2,6],[3,4,12],[2,3,6],[1,1,1],[15,1,1],[1,16,16],[2,2,2],[3,3,9],[16,1,8],[9,1,6],[5,3,12],[2,2,3],[3,5,7],[7,2,0],[4,3,6],[2,3,4],[1,15,8],[16,1,0],[5,3,9],[15,1,7],[2,4,6],[1,16,7],[3,5,12],[1,16,8],[4,4,1],[3,5,0],[3,5,8],[1,16,0],[5,3,3],[5,3,0],[1,13,9],[3,5,2],[1,9,6],[6,2,12],[4,3,8],[3,5,5],[5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