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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.q: D = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.p: G = None
        self.u: C = None
        self.q: H = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.q: D = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.p: G = None
        self.u: C = None
        self.q: H = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

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

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

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

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