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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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