PROGRAMMING:Employees and employees
As we all know, there are often failures between the routes of Unicom. Keven is happy at the top of the canyon and has no time to maintain the shortest path between routes. Please help him answer all the questions.
Firstly, a network is given, which is simplified as * * undirected connected graph * *, * *, which consists of $$n $$routes and $$M $$edges, and the length of each edge is 1 * *.
There are three operations:
Operation 1: $$a, B $$the path between the two routes is broken.
Operation 2: $$a, B $$path connection between two routes.
Operation 3: ask the shortest path between $$a and $$B.
###Input format:
Three integers in the first line $$n, m, q (1 < = n < = 100,1 < = m < = n * (n-1) / 2,1 < Q < = 10000)$$
Next, $$M $$line, two integers of each line, $$a and B $, indicate that there is a path between $$a and B $
Next, $$q $$line, each line of $$OP, a, B $$three integers, corresponding to the above operation
Ensure that all inputs are legal, without double edge and self loop.
###Output format:
You need to answer 3 in order. If Unicom outputs * * the size of the shortest path * *, otherwise - 1 is output
###Input example:
Here is a set of inputs. For example:
```in
3 3 8
3 2
1 2
3 1
3 2 3
3 1 3
1 2 3
3 3 2
3 2 1
1 1 3
2 2 3
3 1 3
```
###Output example:
The corresponding output is given here. For example:
```out
one
one
two
one
two
```
answer:If there is no answer, please comment
Firstly, a network is given, which is simplified as * * undirected connected graph * *, * *, which consists of $$n $$routes and $$M $$edges, and the length of each edge is 1 * *.
There are three operations:
Operation 1: $$a, B $$the path between the two routes is broken.
Operation 2: $$a, B $$path connection between two routes.
Operation 3: ask the shortest path between $$a and $$B.
###Input format:
Three integers in the first line $$n, m, q (1 < = n < = 100,1 < = m < = n * (n-1) / 2,1 < Q < = 10000)$$
Next, $$M $$line, two integers of each line, $$a and B $, indicate that there is a path between $$a and B $
Next, $$q $$line, each line of $$OP, a, B $$three integers, corresponding to the above operation
Ensure that all inputs are legal, without double edge and self loop.
###Output format:
You need to answer 3 in order. If Unicom outputs * * the size of the shortest path * *, otherwise - 1 is output
###Input example:
Here is a set of inputs. For example:
```in
3 3 8
3 2
1 2
3 1
3 2 3
3 1 3
1 2 3
3 3 2
3 2 1
1 1 3
2 2 3
3 1 3
```
###Output example:
The corresponding output is given here. For example:
```out
one
one
two
one
two
```
answer:If there is no answer, please comment