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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

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

f = A("f")
e = B("e")
j = C("j")
b = D("b")
m = E("m")
n = F("n")
k = G("k")
c = G("c")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

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

f = A("f")
e = B("e")
j = C("j")
b = D("b")
m = E("m")
n = F("n")
k = G("k")
c = G("c")
l = E("l")

f.p = j
f.t = n
e.z = n
e.s = n
e.p = j
e.w = j
e.o = j
e.t = b
e.u = f
j.w = k
b.y = l
b.p = l
b.o = e
b.u = e
b.s = f
b.t = n
b.w = n
m.r = l
m.t = e
m.v = j
m.s = j
n.y = c
n.x = f
n.z = f
n.w = j
n.s = k
k.w = e
c.w = e
l.r = m
l.t = e
l.v = j
l.s = j
assert e.s.w.w.w.t.t.txt == "n"