class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.y: I = None
        self.w: B = None
        self.o: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: H = None
        self.o: B = None
        self.q: I = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: G = None
        self.q: I = None
        self.x: C = None
        self.v: C = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: H = None
        self.o: B = None
        self.q: I = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: G = None
        self.q: I = None
        self.x: C = None
        self.v: C = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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