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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.q: A = None
        self.u: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.q: A = None
        self.u: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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