class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.p: E = None
        self.u: J = None
        self.w: B = None
        self.q: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: F = None
        self.z: G = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.s: H = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.u: A = None
        self.t: I = None
        self.q: G = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: J = None
        self.v: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: F = None
        self.z: G = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.s: H = None
        self.x: B = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.u: A = None
        self.t: I = None
        self.q: G = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: J = None
        self.v: E = None
        self.x: E = None
        self.txt = txt

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

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

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