class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.x: J = None
        self.r: H = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: G = None
        self.r: F = None
        self.q: G = None
        self.s: G = None
        self.p: F = None
        self.u: I = None
        self.x: D = None
        self.w: J = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: C = None
        self.u: H = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: D = None
        self.y: D = None
        self.o: D = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.x: J = None
        self.r: H = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: G = None
        self.r: F = None
        self.q: G = None
        self.s: G = None
        self.p: F = None
        self.u: I = None
        self.x: D = None
        self.w: J = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: C = None
        self.u: H = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: D = None
        self.y: D = None
        self.o: D = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

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

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