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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.u: H = None
        self.y: E = None
        self.x: A = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.u: H = None
        self.y: E = None
        self.x: A = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: E = None
        self.x: E = None
        self.txt = txt

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

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