class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: E = None
        self.p: J = None
        self.u: E = None
        self.t: H = None
        self.r: G = None
        self.x: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: H = None
        self.z: D = None
        self.p: J = None
        self.u: A = None
        self.s: J = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.y: B = None
        self.s: A = None
        self.o: I = None
        self.q: J = None
        self.x: I = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.r: E = None
        self.y: H = None
        self.s: D = None
        self.x: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: H = None
        self.z: D = None
        self.p: J = None
        self.u: A = None
        self.s: J = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.y: B = None
        self.s: A = None
        self.o: I = None
        self.q: J = None
        self.x: I = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: E = None
        self.r: E = None
        self.y: H = None
        self.s: D = None
        self.x: F = None
        self.q: D = None
        self.txt = txt

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

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