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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.s: A = None
        self.x: F = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: F = None
        self.w: D = None
        self.u: I = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: I = None
        self.r: B = None
        self.p: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: I = None
        self.p: E = None
        self.x: G = None
        self.q: C = None
        self.s: E = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: C = None
        self.o: B = None
        self.s: E = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.s: A = None
        self.x: F = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: F = None
        self.w: D = None
        self.u: I = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: I = None
        self.r: B = None
        self.p: E = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: I = None
        self.p: E = None
        self.x: G = None
        self.q: C = None
        self.s: E = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: C = None
        self.o: B = None
        self.s: E = None
        self.t: C = None
        self.txt = txt

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

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

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