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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: I = None
        self.y: F = None
        self.r: D = None
        self.p: H = None
        self.o: D = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.s: G = None
        self.z: E = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: I = None
        self.y: F = None
        self.r: D = None
        self.p: H = None
        self.o: D = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.s: G = None
        self.z: E = None
        self.t: C = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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