class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: I = None
        self.v: G = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: G = None
        self.z: I = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.p: D = None
        self.r: I = None
        self.z: A = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: B = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.t: A = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: G = None
        self.z: I = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.p: D = None
        self.r: I = None
        self.z: A = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: B = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.t: A = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

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

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