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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.v: E = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.s: G = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.o: F = None
        self.y: D = None
        self.v: C = None
        self.q: G = None
        self.w: D = None
        self.x: D = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.r: G = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: A = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.s: G = None
        self.t: C = None
        self.q: D = None
        self.x: B = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.v: E = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.s: G = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.o: F = None
        self.y: D = None
        self.v: C = None
        self.q: G = None
        self.w: D = None
        self.x: D = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.r: G = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: A = None
        self.p: A = None
        self.t: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: H = None
        self.s: G = None
        self.t: C = None
        self.q: D = None
        self.x: B = None
        self.u: A = None
        self.txt = txt

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

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