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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.y: I = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.y: I = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: E = None
        self.o: G = None
        self.txt = txt

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

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

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

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