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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: D = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

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

j.q = d
j.u = c
b.r = d
b.z = d
b.v = i
b.w = e
e.o = b
e.s = d
e.r = j
e.z = k
e.x = l
k.v = d
k.z = d
k.u = j
k.s = e
d.o = l
d.v = l
a.t = c
a.o = k
a.w = k
a.p = k
m.q = j
m.t = k
m.o = k
m.v = e
l.q = j
l.t = k
l.o = k
l.v = e
i.r = d
i.z = d
i.v = b
i.w = e
c.q = d
c.u = j
assert k.z.o.q.u.q.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: E = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: D = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

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

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