class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.s: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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