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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.u: B = None
        self.v: B = None
        self.o: A = None
        self.s: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.u: B = None
        self.v: B = None
        self.o: A = None
        self.s: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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