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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
n = D("n")
a = E("a")
k = F("k")
d = G("d")
l = H("l")
c = I("c")
h = J("h")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
n = D("n")
a = E("a")
k = F("k")
d = G("d")
l = H("l")
c = I("c")
h = J("h")

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