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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.r: E = None
        self.t: F = None
        self.o: A = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
m = D("m")
c = E("c")
l = F("l")
h = G("h")
g = H("g")
f = I("f")

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.r: E = None
        self.t: F = None
        self.o: A = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
m = D("m")
c = E("c")
l = F("l")
h = G("h")
g = H("g")
f = I("f")

e.r = f
e.t = l
e.p = m
d.r = l
d.v = h
a.q = h
m.s = f
m.x = f
c.w = e
c.u = e
c.y = e
c.r = h
c.o = g
c.t = d
c.s = d
c.z = f
c.v = l
l.s = a
l.r = m
l.z = e
l.w = h
l.p = h
l.x = g
l.v = c
l.q = d
l.t = f
h.z = c
h.u = c
h.w = l
h.q = f
h.t = m
h.s = g
g.p = d
g.x = f
f.z = d
f.y = a
f.r = c
f.t = l
f.o = e
assert c.v.z.r.r.r.s.x.z.txt == "d"