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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: D = None
        self.o: H = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.q: D = None
        self.v: C = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.v: D = None
        self.z: B = None
        self.y: A = None
        self.x: A = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: D = None
        self.o: H = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.q: D = None
        self.v: C = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.v: D = None
        self.z: B = None
        self.y: A = None
        self.x: A = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

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

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