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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: G = None
        self.z: F = None
        self.y: F = None
        self.o: A = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: G = None
        self.z: F = None
        self.y: F = None
        self.o: A = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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