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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: A = None
        self.u: J = None
        self.w: B = None
        self.v: D = None
        self.y: A = None
        self.z: J = None
        self.s: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.txt = txt

e = A("e")
h = B("h")
f = C("f")
g = D("g")
n = E("n")
m = F("m")
l = G("l")
i = H("i")
k = I("k")
d = J("d")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: A = None
        self.u: J = None
        self.w: B = None
        self.v: D = None
        self.y: A = None
        self.z: J = None
        self.s: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: G = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.txt = txt

e = A("e")
h = B("h")
f = C("f")
g = D("g")
n = E("n")
m = F("m")
l = G("l")
i = H("i")
k = I("k")
d = J("d")

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