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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: F = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: E = None
        self.z: B = None
        self.x: A = None
        self.o: D = None
        self.t: F = None
        self.txt = txt

j = A("j")
c = B("c")
h = C("h")
m = D("m")
i = E("i")
f = F("f")
g = A("g")
b = F("b")
k = B("k")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: F = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: E = None
        self.z: B = None
        self.x: A = None
        self.o: D = None
        self.t: F = None
        self.txt = txt

j = A("j")
c = B("c")
h = C("h")
m = D("m")
i = E("i")
f = F("f")
g = A("g")
b = F("b")
k = B("k")

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