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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

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

g.o = h
g.q = b
b.r = n
b.w = h
n.v = b
n.s = f
d.v = h
d.s = b
j.z = b
j.s = d
l.v = i
l.s = e
h.z = d
h.q = g
h.t = f
e.v = b
e.s = f
f.z = b
f.s = d
i.v = b
i.s = f
assert f.z.w.q.o.t.z.w.txt == "h"