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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: B = None
        self.p: A = None
        self.v: F = None
        self.z: J = None
        self.q: H = None
        self.r: J = None
        self.u: B = None
        self.t: A = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: I = None
        self.p: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.p: C = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: B = None
        self.p: A = None
        self.v: F = None
        self.z: J = None
        self.q: H = None
        self.r: J = None
        self.u: B = None
        self.t: A = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: I = None
        self.p: C = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: D = None
        self.p: C = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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