class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.w: I = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: I = None
        self.v: H = None
        self.z: H = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: I = None
        self.v: H = None
        self.z: H = None
        self.t: I = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

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

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

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