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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: G = None
        self.u: G = None
        self.v: F = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

c = A("c")
i = B("i")
a = C("a")
g = D("g")
e = E("e")
j = F("j")
h = G("h")
l = H("l")
k = G("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: G = None
        self.u: G = None
        self.v: F = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

c = A("c")
i = B("i")
a = C("a")
g = D("g")
e = E("e")
j = F("j")
h = G("h")
l = H("l")
k = G("k")

c.o = j
c.z = e
i.s = c
i.y = g
a.y = i
a.v = i
a.s = l
a.u = h
a.x = j
a.q = g
a.r = e
g.t = i
e.t = j
e.v = j
e.p = k
e.q = i
j.v = c
j.q = a
h.y = g
h.w = k
h.u = k
h.v = j
h.o = j
l.u = e
l.x = a
l.w = a
l.t = a
k.y = g
k.w = h
k.u = h
k.v = j
k.o = j
assert c.o.v.o.q.txt == "a"