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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: H = None
        self.q: G = None
        self.z: E = None
        self.o: F = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: B = None
        self.o: D = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.txt = txt

f = A("f")
g = B("g")
c = C("c")
j = D("j")
e = E("e")
l = F("l")
n = G("n")
a = H("a")
i = B("i")
m = D("m")

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: H = None
        self.q: G = None
        self.z: E = None
        self.o: F = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: B = None
        self.o: D = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.txt = txt

f = A("f")
g = B("g")
c = C("c")
j = D("j")
e = E("e")
l = F("l")
n = G("n")
a = H("a")
i = B("i")
m = D("m")

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