class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.q: G = None
        self.x: H = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.z: F = None
        self.p: G = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: G = None
        self.s: B = None
        self.o: F = None
        self.q: G = None
        self.z: H = None
        self.t: G = None
        self.v: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: G = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: F = None
        self.v: E = None
        self.q: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: D = None
        self.z: F = None
        self.p: G = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: G = None
        self.s: B = None
        self.o: F = None
        self.q: G = None
        self.z: H = None
        self.t: G = None
        self.v: C = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: G = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: F = None
        self.v: E = None
        self.q: I = None
        self.txt = txt

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

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

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