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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.x: D = None
        self.w: H = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.v: D = None
        self.q: H = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: A = None
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.x: D = None
        self.w: H = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.v: D = None
        self.q: H = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: A = None
        self.x: E = None
        self.p: B = None
        self.txt = txt

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

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