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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: G = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: D = None
        self.o: B = None
        self.p: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.r: G = None
        self.x: C = None
        self.z: B = None
        self.p: H = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.u: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: J = None
        self.v: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: G = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: D = None
        self.o: B = None
        self.p: F = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.r: G = None
        self.x: C = None
        self.z: B = None
        self.p: H = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.u: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: J = None
        self.v: J = None
        self.txt = txt

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

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

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

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

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