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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.w: D = None
        self.y: H = None
        self.q: E = None
        self.o: F = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.z: D = None
        self.v: D = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.w: D = None
        self.y: H = None
        self.q: E = None
        self.o: F = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.z: D = None
        self.v: D = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

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

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