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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: A = None
        self.o: F = None
        self.w: C = None
        self.z: C = None
        self.q: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: A = None
        self.o: F = None
        self.w: C = None
        self.z: C = None
        self.q: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

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

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

j.w = d
j.y = i
j.q = c
j.x = h
i.o = n
i.v = n
i.w = g
g.o = i
g.x = k
k.x = l
k.z = m
k.r = m
h.s = d
h.z = d
h.y = j
h.q = j
h.o = l
h.r = l
h.w = g
m.v = k
m.x = k
m.r = h
c.u = j
c.y = m
d.o = i
d.x = k
n.o = i
n.v = i
n.w = g
l.v = k
l.x = k
l.r = h
assert c.u.w.x.x.r.w.o.v.v.v.txt == "n"