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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

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

h = A("h")
a = B("a")
b = C("b")
c = D("c")
m = E("m")
j = F("j")
g = G("g")
k = H("k")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

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

h = A("h")
a = B("a")
b = C("b")
c = D("c")
m = E("m")
j = F("j")
g = G("g")
k = H("k")

h.z = j
h.u = j
h.r = a
h.o = a
h.s = g
h.w = k
h.y = b
h.v = c
a.x = b
a.t = k
a.z = j
b.t = c
b.r = a
b.u = a
b.s = a
b.q = m
b.o = m
b.w = h
c.r = g
c.x = h
m.v = g
m.q = h
m.p = h
m.w = c
m.y = j
j.u = g
j.z = b
g.o = b
g.y = b
k.s = j
k.p = g
k.w = g
k.y = g
assert k.y.y.s.txt == "a"