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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.t: H = None
        self.r: E = None
        self.v: A = None
        self.o: E = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: I = None
        self.o: H = None
        self.q: A = None
        self.z: E = None
        self.r: D = None
        self.t: H = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: A = None
        self.x: G = None
        self.z: I = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: I = None
        self.t: H = None
        self.r: E = None
        self.v: A = None
        self.o: E = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: I = None
        self.o: H = None
        self.q: A = None
        self.z: E = None
        self.r: D = None
        self.t: H = None
        self.w: E = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.r: A = None
        self.x: G = None
        self.z: I = None
        self.v: C = None
        self.txt = txt

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

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

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