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

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

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

k.u = i
k.z = h
d.t = g
d.z = g
d.o = a
d.w = a
d.y = k
d.p = m
d.v = j
d.s = c
d.q = h
i.v = g
i.u = f
c.v = m
g.o = k
g.q = f
f.u = j
f.w = h
a.o = g
a.s = i
a.z = i
a.r = m
a.v = m
m.u = f
m.o = c
m.s = a
h.s = m
j.p = c
j.t = d
j.r = g
assert h.s.o.v.u.u.t.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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