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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.s: B = None
        self.q: B = None
        self.o: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.t: A = None
        self.q: A = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.s: B = None
        self.q: B = None
        self.o: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.t: A = None
        self.q: A = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

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

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

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