class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: E = None
        self.x: D = None
        self.o: J = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.u: I = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: J = None
        self.p: C = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: A = None
        self.s: C = None
        self.u: H = None
        self.q: I = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: I = None
        self.z: D = None
        self.y: I = None
        self.x: J = None
        self.v: C = None
        self.u: B = None
        self.p: B = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: G = None
        self.s: A = None
        self.p: E = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: B = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.u: I = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: J = None
        self.p: C = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: A = None
        self.s: C = None
        self.u: H = None
        self.q: I = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: I = None
        self.z: D = None
        self.y: I = None
        self.x: J = None
        self.v: C = None
        self.u: B = None
        self.p: B = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: G = None
        self.s: A = None
        self.p: E = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: B = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

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