class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.t: C = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.z: A = None
        self.v: D = None
        self.o: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.y: G = None
        self.s: G = None
        self.x: D = None
        self.w: D = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.q: A = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.z: A = None
        self.v: D = None
        self.o: D = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.y: G = None
        self.s: G = None
        self.x: D = None
        self.w: D = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: C = None
        self.q: A = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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