class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.s: C = None
        self.r: C = None
        self.t: G = None
        self.v: D = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.p: C = None
        self.x: C = None
        self.t: D = None
        self.y: B = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: D = None
        self.s: C = None
        self.r: C = None
        self.t: G = None
        self.v: D = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: G = None
        self.p: C = None
        self.x: C = None
        self.t: D = None
        self.y: B = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

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