class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.v: A = None
        self.t: G = None
        self.q: G = None
        self.o: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.v: A = None
        self.t: G = None
        self.q: G = None
        self.o: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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