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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.t: B = None
        self.u: H = None
        self.w: H = None
        self.x: H = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.r: A = None
        self.p: A = None
        self.y: E = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.z: D = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.t: B = None
        self.u: H = None
        self.w: H = None
        self.x: H = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.r: A = None
        self.p: A = None
        self.y: E = None
        self.q: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.z: D = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

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