class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.z: D = None
        self.p: C = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: D = None
        self.z: G = None
        self.r: E = None
        self.t: E = None
        self.y: C = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.s: G = None
        self.z: G = None
        self.y: D = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.r: E = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: D = None
        self.z: G = None
        self.r: E = None
        self.t: E = None
        self.y: C = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: F = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: G = None
        self.s: G = None
        self.z: G = None
        self.y: D = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.r: E = None
        self.o: F = None
        self.q: A = None
        self.txt = txt

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

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