Ping Identity interview question

- implement singlton - implement atutomat in good complexity and saving time