An inefficient solution