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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.r: A = None
        self.p: D = None
        self.o: G = None
        self.z: G = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.v: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.v: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.r: A = None
        self.p: D = None
        self.o: G = None
        self.z: G = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.v: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.v: F = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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