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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.s: G = None
        self.y: A = None
        self.w: F = None
        self.o: A = None
        self.q: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.p: E = None
        self.u: F = None
        self.t: A = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.y: G = None
        self.txt = txt

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

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

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

d = A("d")
i = B("i")
g = C("g")
a = D("a")
l = E("l")
f = F("f")
j = G("j")
h = H("h")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.s: G = None
        self.y: A = None
        self.w: F = None
        self.o: A = None
        self.q: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.p: E = None
        self.u: F = None
        self.t: A = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.y: G = None
        self.txt = txt

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

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

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

d = A("d")
i = B("i")
g = C("g")
a = D("a")
l = E("l")
f = F("f")
j = G("j")
h = H("h")

d.t = i
d.v = l
d.s = f
d.u = g
d.q = g
d.r = h
i.t = f
i.w = f
i.q = f
i.v = l
i.s = j
i.y = d
i.o = d
i.p = a
g.r = i
g.w = d
g.s = d
g.q = j
a.w = i
a.y = l
a.p = l
a.u = f
a.t = d
a.v = j
l.w = d
l.z = j
l.y = j
f.y = g
f.r = l
j.u = a
h.q = g
h.s = g
h.y = i
h.t = j
h.r = j
h.v = l
h.o = d
assert d.t.s.u.txt == "a"