class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: I = None
        self.v: D = None
        self.r: J = None
        self.s: E = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.p: J = None
        self.q: C = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.v: B = None
        self.u: H = None
        self.x: G = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.u: F = None
        self.p: B = None
        self.t: E = None
        self.s: J = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.z: J = None
        self.q: A = None
        self.w: B = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.p: J = None
        self.q: C = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.v: B = None
        self.u: H = None
        self.x: G = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.u: F = None
        self.p: B = None
        self.t: E = None
        self.s: J = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: F = None
        self.z: J = None
        self.q: A = None
        self.w: B = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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