class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

g = A("g")
n = B("n")
j = C("j")
f = D("f")
c = E("c")
k = F("k")
e = G("e")
b = H("b")

g.o = k
g.y = n
g.u = c
n.s = e
j.w = n
j.u = b
j.s = e
f.q = n
c.v = e
k.u = n
k.z = b
k.t = b
k.v = f
k.o = j
e.r = b
e.w = c
e.z = c
b.s = n
b.q = k
b.t = k
b.z = g
assert j.w.s.r.q.z.z.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

g = A("g")
n = B("n")
j = C("j")
f = D("f")
c = E("c")
k = F("k")
e = G("e")
b = H("b")

g.o = k
g.y = n
g.u = c
n.s = e
j.w = n
j.u = b
j.s = e
f.q = n
c.v = e
k.u = n
k.z = b
k.t = b
k.v = f
k.o = j
e.r = b
e.w = c
e.z = c
b.s = n
b.q = k
b.t = k
b.z = g
assert j.w.s.r.q.z.z.y.s.txt == "e"