class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

k.v = b
k.q = m
k.y = m
b.q = j
b.r = k
e.u = k
e.z = a
c.t = e
c.u = k
c.w = m
i.q = j
i.u = j
i.p = e
i.z = e
i.w = d
i.y = m
j.o = d
j.u = e
j.q = m
j.s = i
j.p = f
m.o = c
m.u = e
m.q = j
m.s = i
m.p = f
a.q = j
a.u = j
a.y = j
a.p = e
a.z = e
a.w = d
f.q = m
f.r = k
d.t = e
d.u = k
d.w = j
assert m.q.s.y.s.w.u.q.s.txt == "i"