snake problem