class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: I = None
        self.u: J = None
        self.z: E = None
        self.x: G = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: D = None
        self.q: A = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: J = None
        self.r: D = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.s: F = None
        self.y: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.v: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: D = None
        self.q: A = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: J = None
        self.r: D = None
        self.u: B = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.s: F = None
        self.y: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.v: H = None
        self.txt = txt

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

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