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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.w: E = None
        self.u: D = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.x: F = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

g = A("g")
k = B("k")
l = C("l")
j = D("j")
c = E("c")
h = F("h")
n = A("n")

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.w: E = None
        self.u: D = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: D = None
        self.x: F = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

g = A("g")
k = B("k")
l = C("l")
j = D("j")
c = E("c")
h = F("h")
n = A("n")

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