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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: A = None
        self.q: B = None
        self.p: E = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: A = None
        self.q: B = None
        self.p: E = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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