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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.o: C = None
        self.u: G = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: E = None
        self.w: G = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: C = None
        self.o: C = None
        self.u: G = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: E = None
        self.w: G = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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