class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.q: C = None
        self.u: F = None
        self.r: C = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: D = None
        self.v: F = None
        self.txt = txt

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

c.z = j
c.t = k
c.u = k
c.o = k
c.v = k
c.q = m
c.r = i
d.q = i
d.v = h
d.u = h
d.s = h
d.w = k
d.o = k
d.z = j
i.r = c
i.p = e
i.y = d
n.r = a
n.v = h
n.z = k
n.o = c
h.o = e
h.r = a
k.v = h
k.s = h
k.z = e
k.t = j
a.o = k
a.v = k
a.r = n
j.q = m
j.v = h
j.u = h
j.s = h
j.w = k
j.o = k
j.z = d
m.r = c
m.p = n
m.y = d
e.r = a
e.v = h
e.z = k
e.o = c
assert c.z.w.s.o.v.r.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.q: C = None
        self.u: F = None
        self.r: C = None
        self.o: F = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: D = None
        self.v: F = None
        self.txt = txt

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

c.z = j
c.t = k
c.u = k
c.o = k
c.v = k
c.q = m
c.r = i
d.q = i
d.v = h
d.u = h
d.s = h
d.w = k
d.o = k
d.z = j
i.r = c
i.p = e
i.y = d
n.r = a
n.v = h
n.z = k
n.o = c
h.o = e
h.r = a
k.v = h
k.s = h
k.z = e
k.t = j
a.o = k
a.v = k
a.r = n
j.q = m
j.v = h
j.u = h
j.s = h
j.w = k
j.o = k
j.z = d
m.r = c
m.p = n
m.y = d
e.r = a
e.v = h
e.z = k
e.o = c
assert c.z.w.s.o.v.r.r.o.txt == "c"