class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: D = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.t: F = None
        self.w: G = None
        self.p: G = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.v: F = None
        self.w: E = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.t: F = None
        self.w: G = None
        self.p: G = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.v: F = None
        self.w: E = None
        self.p: B = None
        self.txt = txt

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

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

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