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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.p: C = None
        self.y: E = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: B = None
        self.t: H = None
        self.z: A = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: H = None
        self.s: H = None
        self.q: B = None
        self.v: E = None
        self.y: C = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

c = A("c")
j = B("j")
f = C("f")
a = D("a")
n = E("n")
i = F("i")
k = G("k")
e = H("e")
b = F("b")
l = B("l")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.p: C = None
        self.y: E = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: B = None
        self.t: H = None
        self.z: A = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: H = None
        self.s: H = None
        self.q: B = None
        self.v: E = None
        self.y: C = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

c = A("c")
j = B("j")
f = C("f")
a = D("a")
n = E("n")
i = F("i")
k = G("k")
e = H("e")
b = F("b")
l = B("l")

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