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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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