class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.t: B = None
        self.q: D = None
        self.w: E = None
        self.v: F = None
        self.s: F = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: D = None
        self.w: C = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: B = None
        self.r: A = None
        self.s: A = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: D = None
        self.w: C = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: B = None
        self.r: A = None
        self.s: A = None
        self.p: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

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