Added naive version with linear layouts, loop and no duplicated layouts