class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: C = None
        self.x: C = None
        self.t: H = None
        self.z: H = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.y: D = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.o: C = None
        self.p: E = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.s: B = None
        self.p: G = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.y: D = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: D = None
        self.o: C = None
        self.p: E = None
        self.v: B = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.s: B = None
        self.p: G = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

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

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