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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: B = None
        self.v: G = None
        self.t: F = None
        self.z: B = None
        self.r: B = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: C = None
        self.o: F = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: B = None
        self.v: G = None
        self.t: F = None
        self.z: B = None
        self.r: B = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: C = None
        self.o: F = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

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

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