class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: C = None
        self.q: B = None
        self.r: D = None
        self.y: C = None
        self.u: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.v: H = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: H = None
        self.u: D = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: G = None
        self.v: H = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: H = None
        self.u: D = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

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

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

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