class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.r: B = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.z: G = None
        self.r: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.s: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: G = None
        self.w: B = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: B = None
        self.txt = txt

i = A("i")
c = B("c")
f = C("f")
a = D("a")
k = E("k")
e = F("e")
n = G("n")
g = C("g")
m = C("m")
j = C("j")

i.q = n
i.z = n
i.x = a
i.w = a
i.r = c
c.q = a
c.o = i
c.z = n
c.r = e
c.x = k
f.y = e
f.x = e
f.s = i
f.q = c
a.w = k
k.u = c
k.v = n
k.o = i
k.s = e
e.s = m
e.z = n
e.w = c
e.v = c
e.q = c
n.s = a
n.u = c
g.y = e
g.x = e
g.s = i
g.q = c
m.y = e
m.x = e
m.s = i
m.q = c
j.y = e
j.x = e
j.s = i
j.q = c
assert e.v.o.w.w.o.r.o.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.r: B = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: A = None
        self.z: G = None
        self.r: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.s: A = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: G = None
        self.w: B = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: B = None
        self.txt = txt

i = A("i")
c = B("c")
f = C("f")
a = D("a")
k = E("k")
e = F("e")
n = G("n")
g = C("g")
m = C("m")
j = C("j")

i.q = n
i.z = n
i.x = a
i.w = a
i.r = c
c.q = a
c.o = i
c.z = n
c.r = e
c.x = k
f.y = e
f.x = e
f.s = i
f.q = c
a.w = k
k.u = c
k.v = n
k.o = i
k.s = e
e.s = m
e.z = n
e.w = c
e.v = c
e.q = c
n.s = a
n.u = c
g.y = e
g.x = e
g.s = i
g.q = c
m.y = e
m.x = e
m.s = i
m.q = c
j.y = e
j.x = e
j.s = i
j.q = c
assert e.v.o.w.w.o.r.o.q.u.txt == "c"