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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: H = None
        self.r: E = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: G = None
        self.x: B = None
        self.v: C = None
        self.w: F = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: H = None
        self.r: E = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: G = None
        self.x: B = None
        self.v: C = None
        self.w: F = None
        self.y: G = None
        self.txt = txt

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

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