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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.s: D = None
        self.r: G = None
        self.q: B = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.r: B = None
        self.x: A = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

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

h = A("h")
e = B("e")
l = C("l")
k = D("k")
a = E("a")
n = F("n")
f = G("f")
d = A("d")
j = F("j")

h.z = l
h.w = e
h.o = e
h.u = e
h.t = a
e.z = a
l.r = n
l.q = f
l.p = f
k.q = l
k.z = a
k.w = a
k.u = f
a.o = e
a.q = e
a.p = f
a.r = f
a.y = f
a.u = f
a.s = k
n.v = k
n.u = l
n.o = l
n.z = l
n.r = e
n.x = h
f.t = l
d.z = l
d.w = e
d.o = e
d.u = e
d.t = a
j.v = k
j.u = l
j.o = l
j.z = l
j.r = e
j.x = h
assert k.u.t.r.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: B = None
        self.t: E = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.w: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.s: D = None
        self.r: G = None
        self.q: B = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.r: B = None
        self.x: A = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

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

h = A("h")
e = B("e")
l = C("l")
k = D("k")
a = E("a")
n = F("n")
f = G("f")
d = A("d")
j = F("j")

h.z = l
h.w = e
h.o = e
h.u = e
h.t = a
e.z = a
l.r = n
l.q = f
l.p = f
k.q = l
k.z = a
k.w = a
k.u = f
a.o = e
a.q = e
a.p = f
a.r = f
a.y = f
a.u = f
a.s = k
n.v = k
n.u = l
n.o = l
n.z = l
n.r = e
n.x = h
f.t = l
d.z = l
d.w = e
d.o = e
d.u = e
d.t = a
j.v = k
j.u = l
j.o = l
j.z = l
j.r = e
j.x = h
assert k.u.t.r.r.z.txt == "a"