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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.p: F = None
        self.u: C = None
        self.w: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.p: F = None
        self.u: C = None
        self.w: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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