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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: A = None
        self.x: E = None
        self.q: A = None
        self.z: E = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: A = None
        self.x: E = None
        self.q: A = None
        self.z: E = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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