Added Q26. Not verified. Third while could be more clean.