The magnet will align itself along the poles of a nearby strongest magnet.
True
Suppose there is a magnet A which is aligned in a north-south direction along the poles of earth's magnet and another strong magnet B which is placed at a large distance to A. Now as magnet B is brought closer to magnet A so magnet A will change its alignment and align itself along the poles of magnet B.This proves that magnet A aligns itself along the poles of nearby strongest magnet (B) because the distance between strong magnet B and magnet A reduces. So, alignment of a magnet depends on two factors (a) Strength of nearby magnet (b) Distance between magnets