class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.x: G = None
        self.s: C = None
        self.z: B = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: I = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: I = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.q: I = None
        self.y: G = None
        self.t: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: F = None
        self.x: B = None
        self.r: B = None
        self.w: B = None
        self.q: J = None
        self.v: F = None
        self.p: A = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: J = None
        self.u: H = None
        self.w: B = None
        self.t: I = None
        self.p: H = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: H = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: I = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: I = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.q: I = None
        self.y: G = None
        self.t: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: F = None
        self.x: B = None
        self.r: B = None
        self.w: B = None
        self.q: J = None
        self.v: F = None
        self.p: A = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: J = None
        self.u: H = None
        self.w: B = None
        self.t: I = None
        self.p: H = None
        self.o: J = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: H = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

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

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