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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

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

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

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

m.z = d
m.y = i
m.x = e
m.p = b
m.v = j
a.x = d
a.s = b
a.y = m
a.r = m
a.v = m
b.w = e
b.r = m
g.x = m
g.s = e
g.o = e
g.p = a
e.x = g
e.q = a
e.z = a
e.o = b
i.s = g
i.y = g
i.q = j
i.t = j
i.w = m
j.s = g
j.y = g
j.q = d
j.t = i
j.w = m
d.s = g
d.y = g
d.q = i
d.t = i
d.w = m
assert m.v.s.s.z.s.r.z.txt == "d"