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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: E = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.s: D = None
        self.x: G = None
        self.y: F = None
        self.v: H = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.p: E = None
        self.o: I = None
        self.q: I = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: J = None
        self.q: B = None
        self.o: J = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: E = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.s: D = None
        self.x: G = None
        self.y: F = None
        self.v: H = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: G = None
        self.p: E = None
        self.o: I = None
        self.q: I = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: J = None
        self.q: B = None
        self.o: J = None
        self.v: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: J = None
        self.txt = txt

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

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

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

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