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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: B = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

m = A("m")
h = B("h")
i = C("i")
n = D("n")
g = E("g")
l = F("l")
b = G("b")
j = E("j")
f = B("f")

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: B = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

m = A("m")
h = B("h")
i = C("i")
n = D("n")
g = E("g")
l = F("l")
b = G("b")
j = E("j")
f = B("f")

m.z = l
m.y = f
m.u = f
m.w = b
m.p = i
m.q = n
m.s = j
h.u = f
i.y = n
i.u = n
i.r = h
i.q = l
n.o = b
n.r = b
n.w = b
n.s = f
n.q = i
g.u = j
g.t = i
g.o = i
g.r = i
g.s = h
l.y = j
l.s = n
b.p = m
b.o = i
b.v = l
j.u = g
j.t = i
j.o = i
j.r = i
j.s = f
f.u = h
assert g.o.q.y.s.txt == "f"