class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: C = None
        self.o: H = None
        self.r: C = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: H = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: G = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.v: J = None
        self.u: C = None
        self.q: I = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: B = None
        self.t: I = None
        self.r: A = None
        self.y: A = None
        self.s: D = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.u: E = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: H = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: G = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.v: J = None
        self.u: C = None
        self.q: I = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: B = None
        self.t: I = None
        self.r: A = None
        self.y: A = None
        self.s: D = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.u: E = None
        self.z: C = None
        self.txt = txt

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

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