class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.u: H = None
        self.t: A = None
        self.y: H = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.u: H = None
        self.t: A = None
        self.y: H = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

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

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

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