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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.x: F = None
        self.v: B = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.q: F = None
        self.o: C = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: F = None
        self.x: F = None
        self.v: B = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.q: F = None
        self.o: C = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

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

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

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