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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.w: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: D = None
        self.q: F = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.w: B = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: D = None
        self.q: F = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

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