class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.t: H = None
        self.o: D = None
        self.w: B = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: D = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: J = None
        self.x: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.x: B = None
        self.y: E = None
        self.q: G = None
        self.z: G = None
        self.v: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.txt = txt

k = A("k")
j = B("j")
l = C("l")
h = D("h")
n = E("n")
b = F("b")
a = G("a")
i = H("i")
f = I("f")
d = J("d")

k.v = h
k.o = h
k.z = l
k.t = i
k.w = j
k.q = f
k.u = f
j.q = l
j.w = n
j.p = f
l.x = i
l.u = h
l.q = d
h.p = i
h.y = b
n.w = b
n.u = d
n.x = k
n.p = i
b.u = i
a.v = n
i.o = k
i.t = k
i.w = d
i.x = d
i.r = h
i.s = n
i.z = n
i.u = a
i.v = a
i.y = b
f.p = j
f.x = j
f.v = j
f.r = l
f.y = n
f.q = a
f.z = a
f.t = d
d.u = n
d.y = j
assert f.y.p.r.p.r.p.r.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.t: H = None
        self.o: D = None
        self.w: B = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: E = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: D = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: J = None
        self.x: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.x: B = None
        self.y: E = None
        self.q: G = None
        self.z: G = None
        self.v: B = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.txt = txt

k = A("k")
j = B("j")
l = C("l")
h = D("h")
n = E("n")
b = F("b")
a = G("a")
i = H("i")
f = I("f")
d = J("d")

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