class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: E = None
        self.q: B = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.v: C = None
        self.r: E = None
        self.u: E = None
        self.z: G = None
        self.y: E = None
        self.x: F = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: A = None
        self.s: E = None
        self.v: E = None
        self.t: H = None
        self.u: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.o: A = None
        self.y: I = None
        self.s: I = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.s: E = None
        self.q: A = None
        self.t: E = None
        self.r: D = None
        self.w: E = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.v: C = None
        self.r: E = None
        self.u: E = None
        self.z: G = None
        self.y: E = None
        self.x: F = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: A = None
        self.s: E = None
        self.v: E = None
        self.t: H = None
        self.u: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.o: A = None
        self.y: I = None
        self.s: I = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.s: E = None
        self.q: A = None
        self.t: E = None
        self.r: D = None
        self.w: E = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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