class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: C = None
        self.t: C = None
        self.u: E = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: D = None
        self.z: F = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: E = None
        self.q: E = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

k = A("k")
h = B("h")
i = C("i")
b = D("b")
j = E("j")
m = F("m")
d = G("d")
g = H("g")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: D = None
        self.z: F = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: E = None
        self.q: E = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: A = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

k = A("k")
h = B("h")
i = C("i")
b = D("b")
j = E("j")
m = F("m")
d = G("d")
g = H("g")

k.v = g
k.y = i
k.t = i
k.r = i
k.o = i
k.u = j
h.y = i
i.y = m
i.z = m
i.t = b
i.s = b
b.x = k
b.v = j
b.q = j
b.o = j
b.y = d
j.v = m
j.y = m
j.s = d
j.q = d
j.x = h
j.w = k
j.t = g
m.r = b
d.z = g
d.o = j
d.v = i
d.u = m
g.t = i
g.v = k
g.x = b
g.w = b
assert i.t.x.y.y.txt == "m"