Q2 solution updated(correct) - Wokwi ESP32, STM32, Arduino Simulator