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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

d = A("d")
i = B("i")
j = C("j")
a = D("a")
e = E("e")
n = F("n")
f = G("f")
l = H("l")
m = I("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

d = A("d")
i = B("i")
j = C("j")
a = D("a")
e = E("e")
n = F("n")
f = G("f")
l = H("l")
m = I("m")

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