class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: H = None
        self.y: D = None
        self.u: I = None
        self.w: E = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: C = None
        self.o: C = None
        self.u: A = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: C = None
        self.o: C = None
        self.u: A = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

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

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