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

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

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

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: F = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: F = None
        self.z: B = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.txt = txt

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

n.y = k
n.z = k
n.s = m
n.w = h
n.t = g
k.y = f
k.s = f
k.r = h
k.z = i
f.y = m
f.u = g
b.w = m
b.r = g
b.q = g
b.z = k
h.r = i
h.x = i
h.v = k
h.u = d
h.s = b
h.w = f
g.t = f
i.r = n
i.q = b
d.r = n
d.q = b
m.w = b
m.r = g
m.q = g
m.z = k
assert h.x.r.y.s.txt == "f"