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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.y: H = None
        self.u: F = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: H = None
        self.p: A = None
        self.q: C = None
        self.o: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: G = None
        self.z: H = None
        self.s: B = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.y: H = None
        self.u: F = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: H = None
        self.p: A = None
        self.q: C = None
        self.o: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: G = None
        self.z: H = None
        self.s: B = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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