Given a Fully Qualified Java Class/ Package name, you must shorten it as such:
Each part of the dot separated package will be shortened to it's first letter, apart from the last section and the class (if it exists).
package names will be all lower case, and the class (if it exists) will start with a capital letter and be UpperCamelCase. packages come in the form of:
(No Class) Input com.stackoverflow.main Output c.s.main (Class) Input com.google.parser.Gson Output c.g.parser.Gson (Class) Input com.google.longer.package.TestClass Output c.g.l.package.TestClass
- Shortest code in bytes wins
- Standard loopholes apply