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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.x: A = None
        self.y: A = None
        self.w: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: I = None
        self.s: F = None
        self.u: G = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.y: I = None
        self.t: A = None
        self.v: A = None
        self.w: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.q: B = None
        self.y: C = None
        self.z: H = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.x: A = None
        self.y: A = None
        self.w: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: I = None
        self.s: F = None
        self.u: G = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.y: I = None
        self.t: A = None
        self.v: A = None
        self.w: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.q: B = None
        self.y: C = None
        self.z: H = None
        self.o: H = None
        self.txt = txt

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

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