class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.s: D = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.y: D = None
        self.t: E = None
        self.z: E = None
        self.w: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.s: D = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.y: D = None
        self.t: E = None
        self.z: E = None
        self.w: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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