class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.p: C = None
        self.t: C = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: H = None
        self.r: C = None
        self.y: G = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.v: B = None
        self.t: H = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: H = None
        self.r: C = None
        self.y: G = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.v: B = None
        self.t: H = None
        self.p: B = None
        self.txt = txt

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

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

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

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