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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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