class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.y: F = None
        self.t: D = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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