class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.u: D = None
        self.q: H = None
        self.r: I = None
        self.o: D = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.w: H = None
        self.p: G = None
        self.z: H = None
        self.r: I = None
        self.q: H = None
        self.u: G = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.r: H = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: E = None
        self.x: J = None
        self.u: C = None
        self.r: E = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: H = None
        self.x: C = None
        self.u: D = None
        self.t: I = None
        self.w: E = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.w: H = None
        self.p: G = None
        self.z: H = None
        self.r: I = None
        self.q: H = None
        self.u: G = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.r: H = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: E = None
        self.x: J = None
        self.u: C = None
        self.r: E = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: H = None
        self.x: C = None
        self.u: D = None
        self.t: I = None
        self.w: E = None
        self.s: E = None
        self.txt = txt

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

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