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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.y: G = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: F = None
        self.q: B = None
        self.w: F = None
        self.z: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: H = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.y: G = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: F = None
        self.q: B = None
        self.w: F = None
        self.z: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: H = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

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