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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.z: D = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.r: E = None
        self.w: H = None
        self.x: E = None
        self.s: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.z: D = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.r: E = None
        self.w: H = None
        self.x: E = None
        self.s: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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