class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: I = None
        self.t: D = None
        self.r: C = None
        self.v: F = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.q: B = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: I = None
        self.t: D = None
        self.r: C = None
        self.v: F = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.q: B = None
        self.s: F = None
        self.txt = txt

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

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