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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: G = None
        self.x: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: H = None
        self.u: D = None
        self.s: C = None
        self.p: G = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.q: D = None
        self.o: C = None
        self.p: D = None
        self.s: C = None
        self.r: F = None
        self.x: G = None
        self.txt = txt

e = A("e")
i = B("i")
h = C("h")
n = D("n")
a = E("a")
j = F("j")
f = G("f")
d = H("d")
b = D("b")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: G = None
        self.x: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: H = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: H = None
        self.u: D = None
        self.s: C = None
        self.p: G = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.q: D = None
        self.o: C = None
        self.p: D = None
        self.s: C = None
        self.r: F = None
        self.x: G = None
        self.txt = txt

e = A("e")
i = B("i")
h = C("h")
n = D("n")
a = E("a")
j = F("j")
f = G("f")
d = H("d")
b = D("b")
k = D("k")

e.w = j
e.r = h
i.o = b
i.x = b
i.y = f
i.v = j
h.p = d
h.y = d
h.w = b
n.r = a
a.r = e
a.w = d
a.z = d
a.u = k
a.s = h
a.p = f
j.s = f
j.o = n
f.w = e
d.y = j
d.r = j
d.w = i
d.q = k
d.p = k
d.o = h
d.s = h
d.x = f
b.r = a
k.r = a
assert e.r.w.r.w.x.w.r.w.r.z.txt == "d"