A 12-inch ruler is divided into three parts. The largest part is three times as a long as the smallest. The middle-sized part is twice as long as the smallest. How long is the smallest part?