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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: D = None
        self.t: H = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.p: B = None
        self.y: G = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.v: A = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: D = None
        self.t: H = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.p: B = None
        self.y: G = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.v: A = None
        self.s: G = None
        self.p: E = None
        self.txt = txt

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

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