class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

i = A("i")
h = B("h")
m = C("m")
c = D("c")
d = E("d")
j = F("j")
b = G("b")
f = E("f")
e = D("e")

i.u = b
i.w = d
h.s = f
m.o = j
m.x = j
m.u = b
m.v = b
m.p = i
c.y = j
c.o = j
c.u = m
c.r = e
c.s = h
c.v = b
c.z = f
d.p = i
d.u = i
d.z = h
d.v = b
j.t = f
j.y = d
j.q = m
j.o = m
j.s = m
j.u = b
b.o = f
b.s = e
f.p = i
f.u = i
f.z = h
f.v = b
e.y = j
e.o = j
e.u = m
e.r = c
e.s = h
e.v = b
e.z = d
assert d.z.s.p.w.u.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

i = A("i")
h = B("h")
m = C("m")
c = D("c")
d = E("d")
j = F("j")
b = G("b")
f = E("f")
e = D("e")

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