class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.o: A = None
        self.z: D = None
        self.r: E = None
        self.p: H = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.x: H = None
        self.p: E = None
        self.t: H = None
        self.z: E = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.u: H = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.v: E = None
        self.u: C = None
        self.o: A = None
        self.t: A = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.w: H = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.o: A = None
        self.z: D = None
        self.r: E = None
        self.p: H = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.x: H = None
        self.p: E = None
        self.t: H = None
        self.z: E = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.u: H = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.v: E = None
        self.u: C = None
        self.o: A = None
        self.t: A = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: C = None
        self.w: H = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

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

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