class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.v: G = None
        self.r: F = None
        self.z: C = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: I = None
        self.r: J = None
        self.s: J = None
        self.u: I = None
        self.t: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: B = None
        self.t: J = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: H = None
        self.s: A = None
        self.u: H = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: J = None
        self.w: D = None
        self.x: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: I = None
        self.r: J = None
        self.s: J = None
        self.u: I = None
        self.t: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: B = None
        self.t: J = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: H = None
        self.s: A = None
        self.u: H = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: J = None
        self.w: D = None
        self.x: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

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