class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: D = None
        self.y: E = None
        self.q: G = None
        self.x: G = None
        self.w: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.v: D = None
        self.t: C = None
        self.w: D = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: B = None
        self.r: A = None
        self.x: A = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: C = None
        self.t: D = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.v: D = None
        self.t: C = None
        self.w: D = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: B = None
        self.r: A = None
        self.x: A = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: C = None
        self.t: D = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

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