Solution:
There is a simple logic for magnet. It has maximum strength at ends and strength is weaker in the center.
You will have to mark the items as A, B and C.
Now bring the end of A near the middle of B then near the middle of C.
If B is attracted towards A, then B is a magnetic material and A is the magnet. C is not attracted, so it is non-magnetic.
If neither B nor C is attracted towards A, the take A closer to the end of B and then to the end of C.
If B attracts A, then B is magnet and C is a non-magnetic material. Also then, A is a magnetic material.
If none of them attracts A or is attracted by A, the A is nonmagnetic material.