Problem18 solved