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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.s: B = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.y: A = None
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.s: B = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.y: A = None
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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