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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: H = None
        self.y: J = None
        self.w: J = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.v: J = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: H = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.z: A = None
        self.t: H = None
        self.s: I = None
        self.u: D = None
        self.txt = txt

n = A("n")
k = B("k")
e = C("e")
b = D("b")
c = E("c")
d = F("d")
i = G("i")
l = H("l")
h = I("h")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: D = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: H = None
        self.y: J = None
        self.w: J = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.v: J = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: H = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.z: A = None
        self.t: H = None
        self.s: I = None
        self.u: D = None
        self.txt = txt

n = A("n")
k = B("k")
e = C("e")
b = D("b")
c = E("c")
d = F("d")
i = G("i")
l = H("l")
h = I("h")
a = J("a")

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