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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.p: E = None
        self.t: F = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: F = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.p: E = None
        self.t: F = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: F = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

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