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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.o: D = None
        self.q: C = None
        self.t: H = None
        self.s: H = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

m = A("m")
c = B("c")
i = C("i")
d = D("d")
b = E("b")
k = F("k")
n = G("n")
g = H("g")
h = B("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.o: D = None
        self.q: C = None
        self.t: H = None
        self.s: H = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

m = A("m")
c = B("c")
i = C("i")
d = D("d")
b = E("b")
k = F("k")
n = G("n")
g = H("g")
h = B("h")

m.y = d
m.r = n
m.o = k
c.u = n
c.t = b
c.v = d
c.z = g
c.s = h
c.x = k
i.s = c
i.t = d
i.u = d
i.x = n
i.q = m
i.p = b
d.t = h
d.q = k
b.x = n
b.u = m
b.r = k
b.p = k
k.x = d
k.o = d
k.p = m
k.q = i
k.t = g
k.s = g
k.r = g
n.r = c
g.z = m
g.q = k
g.p = b
h.u = n
h.t = b
h.v = d
h.z = g
h.s = c
h.x = k
assert m.y.t.z.p.u.y.txt == "d"