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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.w: A = None
        self.y: D = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.r: G = None
        self.w: C = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: C = None
        self.w: H = None
        self.x: B = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.w: A = None
        self.y: D = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.r: G = None
        self.w: C = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: C = None
        self.w: H = None
        self.x: B = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

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

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

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