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

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

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

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

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

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

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

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

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

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

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

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

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

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

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