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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: D = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

a = A("a")
n = B("n")
c = C("c")
i = D("i")
g = E("g")
f = F("f")
l = G("l")
k = G("k")
h = E("h")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: D = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

a = A("a")
n = B("n")
c = C("c")
i = D("i")
g = E("g")
f = F("f")
l = G("l")
k = G("k")
h = E("h")

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