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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.s: G = None
        self.y: H = None
        self.o: C = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
n = C("n")
c = D("c")
m = E("m")
b = F("b")
j = G("j")
i = H("i")
a = C("a")
h = G("h")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.s: G = None
        self.y: H = None
        self.o: C = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
n = C("n")
c = D("c")
m = E("m")
b = F("b")
j = G("j")
i = H("i")
a = C("a")
h = G("h")

e.x = c
e.z = j
e.q = m
e.w = m
e.s = i
g.w = b
g.x = b
g.t = b
g.s = h
g.y = i
g.o = n
g.z = n
n.q = c
n.o = b
n.x = b
n.y = a
n.r = j
n.z = m
c.z = i
c.w = b
m.u = a
m.s = a
m.x = c
b.r = j
b.o = n
b.p = c
j.p = c
i.o = c
i.u = j
a.q = c
a.o = b
a.x = b
a.y = n
a.r = j
a.z = m
h.p = c
assert g.s.p.z.u.p.w.r.txt == "j"