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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.w: D = None
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.w: D = None
        self.s: G = None
        self.t: G = None
        self.txt = txt

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

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

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

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