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

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

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

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

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

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

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

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

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

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

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

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

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

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

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