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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: G = None
        self.y: E = None
        self.s: E = None
        self.x: D = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: G = None
        self.y: E = None
        self.s: E = None
        self.x: D = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

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