Electronic circuits can be represented in this form: "R1 0 1 10k\n R2 1 2 500 \n V 0 2 30". In this format, the statements are separated with "\n", and terms are separated by white space. In each statement, the first element is the type (R for resistors, V for voltages and so on), the second and third terms are connections, and last term is the value. For example, resistor 1 (R1) has 10k ohms. Given a string like this, write a python function that parses the string, and output a list of connections and elements (This information will then be used for further processing.) Please answer in JSON format.
user