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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.r: D = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

d = A("d")
e = B("e")
l = C("l")
h = D("h")
n = E("n")
j = F("j")
i = B("i")

d.w = h
d.z = i
d.s = i
e.w = j
e.s = h
e.r = h
e.o = d
e.q = i
l.p = d
l.v = d
l.r = d
h.w = l
h.z = d
n.s = e
n.z = l
n.o = h
n.t = i
j.y = l
j.q = l
j.w = l
j.s = d
i.w = j
i.s = h
i.r = h
i.o = d
i.q = e
assert d.z.s.w.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.r: D = None
        self.o: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

d = A("d")
e = B("e")
l = C("l")
h = D("h")
n = E("n")
j = F("j")
i = B("i")

d.w = h
d.z = i
d.s = i
e.w = j
e.s = h
e.r = h
e.o = d
e.q = i
l.p = d
l.v = d
l.r = d
h.w = l
h.z = d
n.s = e
n.z = l
n.o = h
n.t = i
j.y = l
j.q = l
j.w = l
j.s = d
i.w = j
i.s = h
i.r = h
i.o = d
i.q = e
assert d.z.s.w.v.w.txt == "h"