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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.r: F = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: A = None
        self.q: E = None
        self.r: D = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.v: F = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.r: F = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: A = None
        self.q: E = None
        self.r: D = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.v: F = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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