class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.q: F = None
        self.u: H = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

k = A("k")
e = B("e")
j = C("j")
l = D("l")
i = E("i")
m = F("m")
d = G("d")
b = H("b")
g = C("g")

k.x = e
k.z = m
e.p = i
e.y = i
e.w = k
e.q = m
e.v = m
e.u = b
j.s = l
j.q = b
j.x = e
l.w = e
l.z = e
l.y = m
l.s = j
i.w = d
m.r = d
m.s = e
m.x = i
d.q = m
d.t = m
d.z = m
d.r = i
d.u = i
d.w = i
d.x = g
d.o = l
b.s = i
b.w = k
b.o = e
g.s = l
g.q = b
g.x = e
assert e.p.w.z.s.y.w.x.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.q: F = None
        self.u: H = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

k = A("k")
e = B("e")
j = C("j")
l = D("l")
i = E("i")
m = F("m")
d = G("d")
b = H("b")
g = C("g")

k.x = e
k.z = m
e.p = i
e.y = i
e.w = k
e.q = m
e.v = m
e.u = b
j.s = l
j.q = b
j.x = e
l.w = e
l.z = e
l.y = m
l.s = j
i.w = d
m.r = d
m.s = e
m.x = i
d.q = m
d.t = m
d.z = m
d.r = i
d.u = i
d.w = i
d.x = g
d.o = l
b.s = i
b.w = k
b.o = e
g.s = l
g.q = b
g.x = e
assert e.p.w.z.s.y.w.x.s.y.txt == "m"