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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: I = None
        self.u: G = None
        self.s: J = None
        self.p: H = None
        self.q: J = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.q: C = None
        self.s: J = None
        self.p: J = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.z: B = None
        self.s: D = None
        self.txt = txt

f = A("f")
a = B("a")
l = C("l")
m = D("m")
n = E("n")
b = F("b")
c = G("c")
d = H("d")
j = I("j")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: I = None
        self.u: G = None
        self.s: J = None
        self.p: H = None
        self.q: J = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.q: C = None
        self.s: J = None
        self.p: J = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.z: B = None
        self.s: D = None
        self.txt = txt

f = A("f")
a = B("a")
l = C("l")
m = D("m")
n = E("n")
b = F("b")
c = G("c")
d = H("d")
j = I("j")
i = J("i")

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