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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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