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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.x: E = None
        self.z: J = None
        self.t: D = None
        self.q: D = None
        self.r: D = None
        self.u: F = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: G = None
        self.y: I = None
        self.o: A = None
        self.p: C = None
        self.t: E = None
        self.w: I = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: B = None
        self.v: C = None
        self.t: G = None
        self.s: J = None
        self.r: B = None
        self.x: E = None
        self.q: C = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.u: E = None
        self.p: J = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: J = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: E = None
        self.x: E = None
        self.z: J = None
        self.t: D = None
        self.q: D = None
        self.r: D = None
        self.u: F = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: G = None
        self.y: I = None
        self.o: A = None
        self.p: C = None
        self.t: E = None
        self.w: I = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: B = None
        self.v: C = None
        self.t: G = None
        self.s: J = None
        self.r: B = None
        self.x: E = None
        self.q: C = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.u: E = None
        self.p: J = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: J = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

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

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

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