class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: J = None
        self.r: F = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: J = None
        self.w: F = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.z: E = None
        self.w: I = None
        self.v: I = None
        self.r: J = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: J = None
        self.w: F = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.z: E = None
        self.w: I = None
        self.v: I = None
        self.r: J = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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