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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.r: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.t: F = None
        self.u: E = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

a = A("a")
m = B("m")
b = C("b")
j = D("j")
e = E("e")
k = F("k")
d = G("d")
f = A("f")
g = G("g")

a.w = k
a.s = g
a.o = b
a.v = e
a.r = e
m.u = f
b.z = m
b.u = j
b.t = k
j.o = b
j.u = a
e.y = b
e.t = j
e.w = m
k.u = b
k.w = b
k.o = j
k.r = g
d.w = j
d.r = j
d.q = m
d.t = k
d.u = e
d.x = e
f.w = k
f.s = d
f.o = b
f.v = e
f.r = e
g.w = j
g.r = j
g.q = m
g.t = k
g.u = e
g.x = e
assert b.u.u.w.w.t.o.u.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.o: C = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.r: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.t: F = None
        self.u: E = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

a = A("a")
m = B("m")
b = C("b")
j = D("j")
e = E("e")
k = F("k")
d = G("d")
f = A("f")
g = G("g")

a.w = k
a.s = g
a.o = b
a.v = e
a.r = e
m.u = f
b.z = m
b.u = j
b.t = k
j.o = b
j.u = a
e.y = b
e.t = j
e.w = m
k.u = b
k.w = b
k.o = j
k.r = g
d.w = j
d.r = j
d.q = m
d.t = k
d.u = e
d.x = e
f.w = k
f.s = d
f.o = b
f.v = e
f.r = e
g.w = j
g.r = j
g.q = m
g.t = k
g.u = e
g.x = e
assert b.u.u.w.w.t.o.u.r.w.txt == "m"