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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.p: A = None
        self.v: G = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.q: G = None
        self.t: H = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.p: A = None
        self.v: G = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.q: G = None
        self.t: H = None
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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