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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.z: F = None
        self.p: D = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.y: A = None
        self.txt = txt

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

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

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

l = A("l")
f = B("f")
h = C("h")
b = D("b")
a = E("a")
i = F("i")
j = C("j")
g = C("g")
e = D("e")
m = B("m")

l.v = f
l.y = b
l.w = i
f.y = i
f.z = i
f.u = m
f.v = m
f.p = b
f.t = b
h.s = l
h.y = l
h.t = i
b.o = h
b.z = i
b.w = i
a.o = g
a.y = b
i.x = b
i.q = e
i.v = l
j.s = l
j.y = l
j.t = i
g.s = l
g.y = l
g.t = i
e.o = j
e.z = i
e.w = i
m.y = i
m.z = i
m.u = f
m.v = f
m.p = b
m.t = e
assert l.v.v.z.x.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.z: F = None
        self.p: D = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.y: A = None
        self.txt = txt

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

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

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

l = A("l")
f = B("f")
h = C("h")
b = D("b")
a = E("a")
i = F("i")
j = C("j")
g = C("g")
e = D("e")
m = B("m")

l.v = f
l.y = b
l.w = i
f.y = i
f.z = i
f.u = m
f.v = m
f.p = b
f.t = b
h.s = l
h.y = l
h.t = i
b.o = h
b.z = i
b.w = i
a.o = g
a.y = b
i.x = b
i.q = e
i.v = l
j.s = l
j.y = l
j.t = i
g.s = l
g.y = l
g.t = i
e.o = j
e.z = i
e.w = i
m.y = i
m.z = i
m.u = f
m.v = f
m.p = b
m.t = e
assert l.v.v.z.x.o.t.txt == "i"