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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: F = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.x: F = None
        self.w: G = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.w: F = None
        self.s: H = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: F = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.x: F = None
        self.w: G = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.w: F = None
        self.s: H = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

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

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

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