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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: E = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: E = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

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