class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: J = None
        self.r: E = None
        self.z: E = None
        self.p: E = None
        self.u: E = None
        self.t: H = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: E = None
        self.o: B = None
        self.r: I = None
        self.v: I = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: J = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: J = None
        self.t: C = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: E = None
        self.o: B = None
        self.r: I = None
        self.v: I = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: J = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: J = None
        self.t: C = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

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

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

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