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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: B = None
        self.r: A = None
        self.s: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: B = None
        self.r: A = None
        self.s: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

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