class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: F = None
        self.x: D = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.z: B = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

c = A("c")
n = B("n")
f = C("f")
a = D("a")
l = E("l")
b = F("b")
i = C("i")
g = D("g")
e = F("e")
j = A("j")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: C = None
        self.z: B = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

c = A("c")
n = B("n")
f = C("f")
a = D("a")
l = E("l")
b = F("b")
i = C("i")
g = D("g")
e = F("e")
j = A("j")

c.y = j
c.o = b
c.x = g
c.u = g
c.z = n
n.p = i
n.q = l
f.y = j
f.z = l
f.s = n
a.p = e
a.q = e
a.u = f
a.z = n
a.t = b
l.w = j
b.q = l
b.o = l
i.y = j
i.z = l
i.s = n
g.p = e
g.t = e
g.u = i
g.z = n
g.q = b
e.q = l
e.o = l
j.y = c
j.o = b
j.x = g
j.u = g
j.z = n
assert n.q.w.o.q.w.z.txt == "n"