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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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