class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: I = None
        self.p: G = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.p: A = None
        self.x: I = None
        self.v: J = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: E = None
        self.p: B = None
        self.s: D = None
        self.t: D = None
        self.y: H = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

e = A("e")
c = B("c")
g = C("g")
d = D("d")
f = E("f")
l = F("l")
b = G("b")
h = H("h")
m = I("m")
n = J("n")

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: I = None
        self.p: G = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: H = None
        self.p: A = None
        self.x: I = None
        self.v: J = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: E = None
        self.p: B = None
        self.s: D = None
        self.t: D = None
        self.y: H = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

e = A("e")
c = B("c")
g = C("g")
d = D("d")
f = E("f")
l = F("l")
b = G("b")
h = H("h")
m = I("m")
n = J("n")

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