class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: D = None
        self.p: G = None
        self.y: H = None
        self.z: B = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.z: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.z: A = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.z: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.z: A = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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