class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.y: B = None
        self.q: A = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

h.w = j
h.o = i
h.q = i
h.y = n
h.t = n
n.z = a
m.z = l
m.v = a
m.y = h
m.p = i
b.u = d
d.o = l
d.s = a
d.z = m
j.w = c
j.u = b
j.s = b
j.t = n
j.o = a
a.w = d
a.u = b
a.s = b
a.t = n
a.o = j
i.w = j
i.o = h
i.q = h
i.y = n
i.t = n
l.z = m
l.v = a
l.y = h
l.p = i
c.o = m
c.s = a
c.z = l
assert a.t.z.t.z.w.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.y: B = None
        self.q: A = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

h.w = j
h.o = i
h.q = i
h.y = n
h.t = n
n.z = a
m.z = l
m.v = a
m.y = h
m.p = i
b.u = d
d.o = l
d.s = a
d.z = m
j.w = c
j.u = b
j.s = b
j.t = n
j.o = a
a.w = d
a.u = b
a.s = b
a.t = n
a.o = j
i.w = j
i.o = h
i.q = h
i.y = n
i.t = n
l.z = m
l.v = a
l.y = h
l.p = i
c.o = m
c.s = a
c.z = l
assert a.t.z.t.z.w.s.w.txt == "d"