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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: H = None
        self.s: G = None
        self.t: F = None
        self.p: C = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: H = None
        self.w: F = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: H = None
        self.q: B = None
        self.p: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: H = None
        self.s: G = None
        self.t: F = None
        self.p: C = None
        self.r: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: H = None
        self.w: F = None
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: H = None
        self.q: B = None
        self.p: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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