class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.q: B = None
        self.r: H = None
        self.y: F = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.u: C = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.u: C = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.o: G = None
        self.txt = txt

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

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