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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: F = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: D = None
        self.x: B = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.q: A = None
        self.o: F = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: F = None
        self.q: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: D = None
        self.x: B = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.q: A = None
        self.o: F = None
        self.z: G = None
        self.s: G = None
        self.txt = txt

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

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