class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: A = None
        self.q: A = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.v: A = None
        self.z: G = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: A = None
        self.q: A = None
        self.t: A = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: G = None
        self.v: A = None
        self.z: G = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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