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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.u: F = None
        self.x: D = None
        self.r: B = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.t: C = None
        self.p: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: F = None
        self.u: F = None
        self.x: D = None
        self.r: B = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.t: C = None
        self.p: D = None
        self.y: A = None
        self.txt = txt

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

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

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