class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.t: A = None
        self.w: D = None
        self.v: A = None
        self.u: F = None
        self.y: G = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: A = None
        self.v: A = None
        self.txt = txt

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

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

l.u = g
b.s = i
b.y = i
b.z = i
b.r = a
b.t = l
b.v = l
b.w = f
b.u = m
b.p = g
a.y = i
a.w = i
a.s = f
a.p = f
f.x = g
f.o = g
f.w = m
f.t = l
j.s = m
j.o = l
m.v = j
m.y = i
m.s = a
i.z = f
i.u = b
i.o = b
i.p = b
i.w = a
i.x = a
i.v = m
i.s = l
g.o = a
g.z = l
g.v = l
k.y = j
assert j.s.v.s.s.s.w.s.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.t: A = None
        self.w: D = None
        self.v: A = None
        self.u: F = None
        self.y: G = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: D = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: A = None
        self.v: A = None
        self.txt = txt

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

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

l.u = g
b.s = i
b.y = i
b.z = i
b.r = a
b.t = l
b.v = l
b.w = f
b.u = m
b.p = g
a.y = i
a.w = i
a.s = f
a.p = f
f.x = g
f.o = g
f.w = m
f.t = l
j.s = m
j.o = l
m.v = j
m.y = i
m.s = a
i.z = f
i.u = b
i.o = b
i.p = b
i.w = a
i.x = a
i.v = m
i.s = l
g.o = a
g.z = l
g.v = l
k.y = j
assert j.s.v.s.s.s.w.s.y.v.txt == "m"