class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: B = None
        self.x: G = None
        self.o: E = None
        self.w: F = None
        self.q: C = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.s: C = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: B = None
        self.x: G = None
        self.o: E = None
        self.w: F = None
        self.q: C = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.s: C = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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