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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

a = A("a")
m = B("m")
h = C("h")
j = D("j")
i = E("i")
k = F("k")
g = G("g")
e = E("e")
l = A("l")

a.z = h
a.r = g
a.t = g
a.w = g
a.s = m
m.o = k
h.u = g
h.z = g
j.u = a
j.y = k
j.s = h
i.w = g
i.s = g
i.v = e
i.y = k
k.x = m
k.w = a
k.z = j
k.t = e
g.v = i
e.w = g
e.s = g
e.v = i
e.y = k
l.z = h
l.r = g
l.t = g
l.w = g
l.s = m
assert h.z.v.y.z.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: G = None
        self.s: B = None
        self.t: G = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

a = A("a")
m = B("m")
h = C("h")
j = D("j")
i = E("i")
k = F("k")
g = G("g")
e = E("e")
l = A("l")

a.z = h
a.r = g
a.t = g
a.w = g
a.s = m
m.o = k
h.u = g
h.z = g
j.u = a
j.y = k
j.s = h
i.w = g
i.s = g
i.v = e
i.y = k
k.x = m
k.w = a
k.z = j
k.t = e
g.v = i
e.w = g
e.s = g
e.v = i
e.y = k
l.z = h
l.r = g
l.t = g
l.w = g
l.s = m
assert h.z.v.y.z.u.r.txt == "g"