class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: I = None
        self.v: G = None
        self.x: C = None
        self.u: G = None
        self.r: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: C = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: C = None
        self.w: E = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

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