noble group java test solution by Sangwoo Kim