class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: A = None
        self.w: B = None
        self.y: C = None
        self.s: C = None
        self.o: A = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.v: C = None
        self.y: F = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: A = None
        self.w: B = None
        self.y: C = None
        self.s: C = None
        self.o: A = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.v: C = None
        self.y: F = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

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

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

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

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