class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: F = None
        self.z: J = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.x: A = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.p: G = None
        self.y: D = None
        self.s: H = None
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.q: H = None
        self.z: D = None
        self.v: D = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.x: A = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.p: G = None
        self.y: D = None
        self.s: H = None
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.q: H = None
        self.z: D = None
        self.v: D = None
        self.t: F = None
        self.txt = txt

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

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