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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: G = None
        self.r: G = None
        self.o: G = None
        self.p: A = None
        self.t: H = None
        self.q: H = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: G = None
        self.r: G = None
        self.o: G = None
        self.p: A = None
        self.t: H = None
        self.q: H = None
        self.s: H = None
        self.txt = txt

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

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