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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

e = A("e")
c = B("c")
m = C("m")
l = D("l")
g = E("g")
b = F("b")
i = D("i")
h = E("h")
k = F("k")
j = B("j")

e.w = b
c.z = m
c.r = i
m.w = g
m.y = k
m.v = b
l.y = g
g.z = j
g.w = m
g.p = k
g.q = h
g.t = e
b.p = k
b.q = k
b.y = m
b.w = c
i.y = g
h.z = j
h.w = m
h.p = b
h.q = g
h.t = e
k.p = b
k.q = b
k.y = m
k.w = j
j.z = m
j.r = l
assert k.w.z.w.w.v.w.r.y.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: F = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

e = A("e")
c = B("c")
m = C("m")
l = D("l")
g = E("g")
b = F("b")
i = D("i")
h = E("h")
k = F("k")
j = B("j")

e.w = b
c.z = m
c.r = i
m.w = g
m.y = k
m.v = b
l.y = g
g.z = j
g.w = m
g.p = k
g.q = h
g.t = e
b.p = k
b.q = k
b.y = m
b.w = c
i.y = g
h.z = j
h.w = m
h.p = b
h.q = g
h.t = e
k.p = b
k.q = b
k.y = m
k.w = j
j.z = m
j.r = l
assert k.w.z.w.w.v.w.r.y.t.w.txt == "b"