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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

m.v = j
m.w = j
m.s = j
m.z = l
m.x = c
a.x = m
i.p = m
i.z = l
l.s = m
l.o = i
j.o = l
b.w = i
b.o = i
b.q = j
b.r = l
c.x = m
h.w = i
h.o = i
h.q = j
h.r = l
assert i.z.o.p.s.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: D = None
        self.w: E = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

m.v = j
m.w = j
m.s = j
m.z = l
m.x = c
a.x = m
i.p = m
i.z = l
l.s = m
l.o = i
j.o = l
b.w = i
b.o = i
b.q = j
b.r = l
c.x = m
h.w = i
h.o = i
h.q = j
h.r = l
assert i.z.o.p.s.o.o.txt == "i"