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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: H = None
        self.r: D = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: H = None
        self.r: D = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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