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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.x: B = None
        self.w: G = None
        self.v: G = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: C = None
        self.o: C = None
        self.y: G = None
        self.t: B = None
        self.r: D = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.x: B = None
        self.w: G = None
        self.v: G = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: C = None
        self.o: C = None
        self.y: G = None
        self.t: B = None
        self.r: D = None
        self.x: G = None
        self.txt = txt

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

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

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