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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.r: D = None
        self.o: D = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.r: D = None
        self.o: D = None
        self.p: A = None
        self.u: H = None
        self.txt = txt

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

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