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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.s: I = None
        self.p: F = 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.v: C = None
        self.u: I = None
        self.q: F = None
        self.z: F = None
        self.r: H = None
        self.x: C = None
        self.p: D = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.s: I = None
        self.p: F = 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.v: C = None
        self.u: I = None
        self.q: F = None
        self.z: F = None
        self.r: H = None
        self.x: C = None
        self.p: D = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

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