class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.z: H = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.u: A = None
        self.y: D = None
        self.x: G = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: G = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: F = None
        self.r: F = None
        self.w: F = None
        self.v: A = None
        self.t: D = None
        self.txt = txt

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

f = A("f")
k = B("k")
l = C("l")
n = D("n")
e = E("e")
i = F("i")
b = G("b")
h = H("h")

f.s = i
f.o = n
f.u = n
f.z = h
f.t = e
k.v = n
k.y = n
k.t = h
k.r = h
k.u = f
k.x = b
l.u = n
l.t = n
l.q = k
n.x = e
n.q = e
n.w = b
e.u = f
e.x = k
i.r = b
i.v = l
i.p = k
i.z = k
b.y = h
b.o = i
b.r = i
b.w = i
b.v = f
b.t = n
h.o = n
h.u = n
h.r = n
h.w = i
h.y = b
h.s = b
h.q = l
h.t = l
assert f.t.x.x.w.r.r.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.z: H = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.u: A = None
        self.y: D = None
        self.x: G = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: G = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: F = None
        self.r: F = None
        self.w: F = None
        self.v: A = None
        self.t: D = None
        self.txt = txt

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

f = A("f")
k = B("k")
l = C("l")
n = D("n")
e = E("e")
i = F("i")
b = G("b")
h = H("h")

f.s = i
f.o = n
f.u = n
f.z = h
f.t = e
k.v = n
k.y = n
k.t = h
k.r = h
k.u = f
k.x = b
l.u = n
l.t = n
l.q = k
n.x = e
n.q = e
n.w = b
e.u = f
e.x = k
i.r = b
i.v = l
i.p = k
i.z = k
b.y = h
b.o = i
b.r = i
b.w = i
b.v = f
b.t = n
h.o = n
h.u = n
h.r = n
h.w = i
h.y = b
h.s = b
h.q = l
h.t = l
assert f.t.x.x.w.r.r.r.txt == "b"