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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.u: E = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.u: E = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

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

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