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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: C = None
        self.u: E = None
        self.w: B = None
        self.p: B = None
        self.v: J = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: C = None
        self.u: E = None
        self.w: B = None
        self.p: B = None
        self.v: J = None
        self.o: C = None
        self.txt = txt

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

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

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