class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.v: F = None
        self.o: C = None
        self.w: C = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: A = None
        self.t: C = None
        self.p: E = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.o: F = None
        self.r: A = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: A = None
        self.t: C = None
        self.p: E = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.o: F = None
        self.r: A = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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