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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.v: E = None
        self.s: H = None
        self.r: B = None
        self.q: E = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: B = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

c = A("c")
a = B("a")
b = C("b")
h = D("h")
f = E("f")
l = F("l")
k = G("k")
i = H("i")

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.v: E = None
        self.s: H = None
        self.r: B = None
        self.q: E = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: B = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

c = A("c")
a = B("a")
b = C("b")
h = D("h")
f = E("f")
l = F("l")
k = G("k")
i = H("i")

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