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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: J = None
        self.o: A = None
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: F = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: I = None
        self.v: C = None
        self.s: F = None
        self.z: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: J = None
        self.o: A = None
        self.s: G = None
        self.x: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: F = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: I = None
        self.v: C = None
        self.s: F = None
        self.z: H = None
        self.w: I = None
        self.txt = txt

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

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