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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.s: C = None
        self.u: F = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.w: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.y: C = None
        self.u: B = None
        self.s: F = None
        self.txt = txt

i = A("i")
n = B("n")
e = C("e")
g = D("g")
b = E("b")
c = F("c")
a = C("a")
k = D("k")
f = F("f")

i.y = b
n.w = b
e.y = k
e.o = n
g.t = e
g.s = e
g.r = e
g.o = k
g.u = f
g.y = n
b.z = i
b.s = e
b.w = a
b.o = k
c.t = e
c.z = e
c.y = a
c.u = n
c.s = f
a.y = k
a.o = n
k.t = a
k.o = g
k.s = e
k.r = e
k.u = f
k.y = n
f.t = a
f.z = e
f.y = e
f.u = n
f.s = c
assert g.u.s.s.u.w.o.o.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.s: C = None
        self.u: F = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.w: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.y: C = None
        self.u: B = None
        self.s: F = None
        self.txt = txt

i = A("i")
n = B("n")
e = C("e")
g = D("g")
b = E("b")
c = F("c")
a = C("a")
k = D("k")
f = F("f")

i.y = b
n.w = b
e.y = k
e.o = n
g.t = e
g.s = e
g.r = e
g.o = k
g.u = f
g.y = n
b.z = i
b.s = e
b.w = a
b.o = k
c.t = e
c.z = e
c.y = a
c.u = n
c.s = f
a.y = k
a.o = n
k.t = a
k.o = g
k.s = e
k.r = e
k.u = f
k.y = n
f.t = a
f.z = e
f.y = e
f.u = n
f.s = c
assert g.u.s.s.u.w.o.o.r.y.txt == "k"