class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: F = None
        self.z: F = None
        self.q: D = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.p: J = None
        self.x: E = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: F = None
        self.z: F = None
        self.q: D = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.p: J = None
        self.x: E = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

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

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