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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.w: H = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: A = None
        self.w: F = None
        self.p: A = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

m = A("m")
j = B("j")
e = C("e")
g = D("g")
a = E("a")
d = F("d")
h = G("h")
i = H("i")
k = C("k")

m.s = g
m.w = j
m.z = h
m.p = a
j.p = h
j.u = a
j.w = i
j.r = d
e.u = g
e.r = g
e.z = j
g.v = m
a.p = m
a.v = m
d.x = j
d.u = a
d.t = h
d.v = m
d.s = m
h.w = j
h.u = d
h.q = d
h.t = m
h.z = g
i.r = a
i.u = m
i.p = m
i.w = d
i.v = k
i.x = h
k.u = g
k.r = g
k.z = j
assert m.w.w.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.z: G = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.w: H = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: A = None
        self.w: F = None
        self.p: A = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

m = A("m")
j = B("j")
e = C("e")
g = D("g")
a = E("a")
d = F("d")
h = G("h")
i = H("i")
k = C("k")

m.s = g
m.w = j
m.z = h
m.p = a
j.p = h
j.u = a
j.w = i
j.r = d
e.u = g
e.r = g
e.z = j
g.v = m
a.p = m
a.v = m
d.x = j
d.u = a
d.t = h
d.v = m
d.s = m
h.w = j
h.u = d
h.q = d
h.t = m
h.z = g
i.r = a
i.u = m
i.p = m
i.w = d
i.v = k
i.x = h
k.u = g
k.r = g
k.z = j
assert m.w.w.v.r.txt == "g"