class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.p: A = None
        self.o: B = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.p: G = None
        self.u: E = None
        self.q: C = None
        self.r: G = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.p: A = None
        self.o: B = None
        self.t: B = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.p: G = None
        self.u: E = None
        self.q: C = None
        self.r: G = None
        self.o: F = None
        self.txt = txt

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

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