class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: F = None
        self.r: F = None
        self.x: C = None
        self.y: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: G = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: J = None
        self.z: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: C = None
        self.u: D = None
        self.q: J = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: F = None
        self.r: F = None
        self.x: C = None
        self.y: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: G = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: J = None
        self.z: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: C = None
        self.u: D = None
        self.q: J = None
        self.o: B = None
        self.txt = txt

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

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

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