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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: F = None
        self.x: F = None
        self.u: C = None
        self.v: G = None
        self.t: A = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.s: G = None
        self.z: C = None
        self.r: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: F = None
        self.x: F = None
        self.u: C = None
        self.v: G = None
        self.t: A = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.s: G = None
        self.z: C = None
        self.r: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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