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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: B = None
        self.p: H = None
        self.y: E = None
        self.u: G = None
        self.v: E = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: C = None
        self.s: E = None
        self.o: G = None
        self.u: B = None
        self.txt = txt

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

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

h = A("h")
n = B("n")
b = C("b")
g = D("g")
e = E("e")
f = F("f")
l = G("l")
d = H("d")
j = B("j")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: B = None
        self.p: H = None
        self.y: E = None
        self.u: G = None
        self.v: E = None
        self.w: G = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: C = None
        self.s: E = None
        self.o: G = None
        self.u: B = None
        self.txt = txt

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

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

h = A("h")
n = B("n")
b = C("b")
g = D("g")
e = E("e")
f = F("f")
l = G("l")
d = H("d")
j = B("j")

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