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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: I = None
        self.z: D = None
        self.v: G = None
        self.q: E = None
        self.r: I = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: C = None
        self.z: B = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: I = None
        self.z: D = None
        self.v: G = None
        self.q: E = None
        self.r: I = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: C = None
        self.z: B = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.t: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: I = None
        self.y: H = None
        self.txt = txt

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

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