class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: I = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: F = None
        self.z: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.u: B = None
        self.p: A = None
        self.q: H = None
        self.x: I = None
        self.v: A = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.txt = txt

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

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

k = A("k")
h = B("h")
i = C("i")
e = D("e")
g = E("g")
a = F("a")
n = G("n")
m = H("m")
b = I("b")

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: F = None
        self.z: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.u: B = None
        self.p: A = None
        self.q: H = None
        self.x: I = None
        self.v: A = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: F = None
        self.txt = txt

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

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

k = A("k")
h = B("h")
i = C("i")
e = D("e")
g = E("g")
a = F("a")
n = G("n")
m = H("m")
b = I("b")

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