solution for single alphabet