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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: H = None
        self.t: G = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.x: F = None
        self.r: H = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.t: E = None
        self.s: F = None
        self.z: D = None
        self.u: E = None
        self.w: C = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: H = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: H = None
        self.t: G = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.x: F = None
        self.r: H = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.t: E = None
        self.s: F = None
        self.z: D = None
        self.u: E = None
        self.w: C = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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