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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.u: E = None
        self.r: G = None
        self.w: I = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: I = None
        self.r: G = None
        self.z: C = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: I = None
        self.q: H = None
        self.r: C = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: I = None
        self.u: E = None
        self.r: G = None
        self.w: I = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: I = None
        self.r: G = None
        self.z: C = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: I = None
        self.q: H = None
        self.r: C = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.txt = txt

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

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