class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.y: I = None
        self.v: B = None
        self.t: D = None
        self.q: H = None
        self.s: J = None
        self.p: B = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.r: C = None
        self.q: F = None
        self.y: H = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: G = None
        self.q: I = None
        self.y: I = None
        self.x: F = None
        self.p: J = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.s: J = None
        self.z: I = None
        self.x: E = None
        self.y: C = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.r: C = None
        self.q: F = None
        self.y: H = None
        self.u: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: G = None
        self.q: I = None
        self.y: I = None
        self.x: F = None
        self.p: J = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: E = None
        self.s: J = None
        self.z: I = None
        self.x: E = None
        self.y: C = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

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

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