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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.o: G = None
        self.w: D = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.t: A = None
        self.u: E = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

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

a = A("a")
d = B("d")
m = C("m")
j = D("j")
n = E("n")
h = F("h")
l = G("l")
f = G("f")
k = D("k")
c = F("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: D = None
        self.o: G = None
        self.w: D = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.t: A = None
        self.u: E = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

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

a = A("a")
d = B("d")
m = C("m")
j = D("j")
n = E("n")
h = F("h")
l = G("l")
f = G("f")
k = D("k")
c = F("c")

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