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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: H = None
        self.r: F = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.t: F = None
        self.q: H = None
        self.p: C = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: D = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.o: A = None
        self.y: H = None
        self.z: B = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: H = None
        self.r: F = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.t: F = None
        self.q: H = None
        self.p: C = None
        self.v: C = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: D = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.o: A = None
        self.y: H = None
        self.z: B = None
        self.s: C = None
        self.txt = txt

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

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