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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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