class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: J = None
        self.s: E = None
        self.o: C = None
        self.w: G = None
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: J = None
        self.q: B = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.s: C = None
        self.v: A = None
        self.p: C = None
        self.x: C = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: B = None
        self.z: F = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: D = None
        self.v: E = None
        self.q: D = None
        self.r: A = None
        self.y: G = None
        self.u: A = None
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: J = None
        self.q: B = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.s: C = None
        self.v: A = None
        self.p: C = None
        self.x: C = None
        self.q: C = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: B = None
        self.z: F = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: D = None
        self.v: E = None
        self.q: D = None
        self.r: A = None
        self.y: G = None
        self.u: A = None
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

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

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