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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.v: D = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.u: A = None
        self.s: D = None
        self.y: B = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.v: D = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.u: A = None
        self.s: D = None
        self.y: B = None
        self.v: E = None
        self.txt = txt

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

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