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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.p: A = None
        self.z: B = None
        self.x: B = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: A = None
        self.y: B = None
        self.s: F = None
        self.z: H = None
        self.o: H = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.o: B = None
        self.u: D = None
        self.t: B = None
        self.p: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.p: A = None
        self.z: B = None
        self.x: B = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: A = None
        self.y: B = None
        self.s: F = None
        self.z: H = None
        self.o: H = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.o: B = None
        self.u: D = None
        self.t: B = None
        self.p: F = None
        self.x: G = None
        self.txt = txt

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

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