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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: I = None
        self.x: G = None
        self.o: I = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.u: I = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: I = None
        self.x: G = None
        self.o: I = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.u: I = None
        self.s: C = None
        self.t: A = None
        self.txt = txt

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

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

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