class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

h.v = e
m.u = e
m.p = h
b.r = j
b.s = j
l.v = b
l.o = g
e.r = m
e.t = m
e.y = m
e.w = m
e.o = m
e.s = c
e.p = h
c.z = l
c.o = k
c.p = k
c.y = e
c.r = g
c.t = h
g.q = a
g.o = k
g.v = m
g.s = b
g.r = h
j.y = m
k.y = l
a.q = g
a.o = k
a.v = m
a.s = b
a.r = h
assert e.r.u.s.z.o.q.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

h.v = e
m.u = e
m.p = h
b.r = j
b.s = j
l.v = b
l.o = g
e.r = m
e.t = m
e.y = m
e.w = m
e.o = m
e.s = c
e.p = h
c.z = l
c.o = k
c.p = k
c.y = e
c.r = g
c.t = h
g.q = a
g.o = k
g.v = m
g.s = b
g.r = h
j.y = m
k.y = l
a.q = g
a.o = k
a.v = m
a.s = b
a.r = h
assert e.r.u.s.z.o.q.r.v.txt == "e"